Skip to content

Commit a283508

Browse files
committed
Merge branch 'sprint' into 'master'
Sprint to Master See merge request open-platform/api!204
2 parents acaed08 + 67239ba commit a283508

File tree

7 files changed

+16
-15
lines changed

7 files changed

+16
-15
lines changed

.gitlab-ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ package-docker:
150150
-e "ETHEREUM_PRIVATE_KEY=${ETHEREUM_PRIVATE_KEY}" \
151151
-e "OPEN_TOKEN_ADDRESS=${OPEN_TOKEN_ADDRESS}" \
152152
-e "EVENT_SUBSCRIPTION=${EVENT_SUBSCRIPTION}" \
153+
-e "WIDGET_HOST=${WIDGET_HOST}" \
153154
${IMAGE_NAME}:${IMAGE_TAG}
154155
"
155156
@@ -171,6 +172,7 @@ deploy-development:
171172
ETHEREUM_PRIVATE_KEY: $ETHEREUM_PRIVATE_KEY_DEV
172173
OPEN_TOKEN_ADDRESS: $OPEN_TOKEN_ADDRESS_DEV
173174
EVENT_SUBSCRIPTION: "true"
175+
WIDGET_HOST: "https://api.open-platform.zensoft.io"
174176
IMAGE_TAG: sprint
175177
before_script: *prepare_key
176178
script: *deploy_to_host
@@ -200,6 +202,7 @@ deploy-production:
200202
ETHEREUM_PRIVATE_KEY: $ETHEREUM_PRIVATE_KEY_PROD
201203
OPEN_TOKEN_ADDRESS: $OPEN_TOKEN_ADDRESS_PROD
202204
EVENT_SUBSCRIPTION: "true"
205+
WIDGET_HOST: "https://api.openfuture.io"
203206
IMAGE_TAG: latest
204207
before_script: *prepare_key
205208
script: *deploy_to_host
@@ -237,7 +240,6 @@ certificates-development:
237240
DEPLOY_HOST: $DEPLOY_HOST_DEV
238241
DEPLOY_KEY: $DEPLOY_KEY_DEV
239242
SERVER_NAME: "api.open-platform.zensoft.io"
240-
WIDGET_HOST: "https://api.open-platform.zensoft.io"
241243
before_script: *prepare_key
242244
script: *update_certificates
243245
only:
@@ -251,7 +253,6 @@ certificates-production:
251253
DEPLOY_HOST: $DEPLOY_HOST_PROD
252254
DEPLOY_KEY: $DEPLOY_KEY_PROD
253255
SERVER_NAME: "api.openfuture.io"
254-
WIDGET_HOST: "https://api.openfuture.io"
255256
before_script: *prepare_key
256257
script: *update_certificates
257258
only:

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## [2.6.1] - 2018-08-03
8+
### Fixed
9+
- Scaffold Creation: Validation on special characters
10+
- Fixed OPEN-widget links to different sources depending on the environment
811

912
## [2.6.0] - 2018-08-02
1013
### Added

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ plugins {
1111
apply plugin: "io.spring.dependency-management"
1212

1313
group = "io.openfuture.api"
14-
version = "2.6.0"
14+
version = "2.6.1"
1515
sourceCompatibility = JavaVersion.VERSION_1_8
1616

1717
repositories {

frontend/src/utils/messageTexts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const messageTextMap = {
2121
'open key is required': 'A Open Key is required.',
2222
'dev address is required': 'A developer address is required.',
2323
'scaffold title is required': 'A scaffold title is required.',
24-
'special characters are forbidden': 'special characters are forbidden',
24+
'special characters are forbidden': 'Special characters are forbidden',
2525
'currency is required': 'Currency is required.',
2626
'low balance': 'Minimum balance: 0,0087 Eth. Change MetaMask account or top up the balance.',
2727

frontend/src/utils/validation.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ export const validateScaffoldProperties = values => {
1818

1919
if (field.name) {
2020
if (field.name[0].match(/[a-z]/) === null) scaffoldFieldsErrors.push(t('first letter must be lowercase'));
21-
/* eslint-disable */
22-
if (field.name.match(/[\s\/\\]/) !== null)
23-
/* eslint-enable */
24-
scaffoldFieldsErrors.push(t('space forbidden'));
25-
if (field.name.match(/^[a-zA-Z0-9]+$/g) === null) {
21+
if (field.name.match(/^[a-zA-Z0-9_]+$/g) === null) {
2622
scaffoldFieldsErrors.push(t('special characters are forbidden'));
2723
}
2824
if (solidityReservedWords.includes(field.name))

widget/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Open-widget
2-
This is a payment widget that you can embed to your site for processing payments from customers in the Cryptocurrency via [OPEN platform](https://api.openfuture.io/) API.
2+
This is a payment widget that you can embed to your site for processing payments from customers in the Cryptocurrency via [OPEN Platform](https://api.openfuture.io/) API.
33

4-
This widget requires [Metamask wallet](https://metamask.io/).
4+
This widget requires [Metamask Wallet](https://metamask.io/).
55

66
[![](http://joxi.net/VrwNex4COodeMA.png)]()
77

88
### How to use a widget
99

1010
Paste the code below to a location at your site where you'd like to use this widget and set the width and height parameters.
11-
You also have to put your scaffold address in the src element: 'https://www.openfuture.io/widget/your_scaffold_address'
11+
You also have to put your scaffold address in the src element: 'https://openfuture.io/widget/your_scaffold_address'
1212
The best solution is to do it dynamically, especially if you have created a lot of scaffolds.
1313

1414

1515
```html
16-
<iframe id="open-widget-iframe" src="https://www.openfuture.io/widget/your_scaffold_address_here" width="400" height="600" scrolling="no" frameborder="0" allowfullscreen></iframe>
16+
<iframe id="open-widget-iframe" src="https://openfuture.io/widget/your_scaffold_address_here" width="400" height="600" scrolling="no" frameborder="0" allowfullscreen></iframe>
1717

1818
```
1919

2020

2121
The widget can contain a maximum of 9 fields of 3 types (string, number, boolean).
22-
Field names and types are set in a [personal OPEN-platform account](https://api.open-platform.zensoft.io/scaffolds/new) during a smart contract creation.
22+
Field names and types are set in a [personal OPEN-platform account](https://api.openfuture.io/scaffolds/new) during a smart contract creation.
2323

widget/src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as internalWeb3 from 'web3';
2+
import * as style from './style.css';
23

34
const _web3 = new internalWeb3(internalWeb3.givenProvider);
45
let windgetData;

0 commit comments

Comments
 (0)