Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transwiser Gateway Update #902

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions web/app/assets/locales/locale-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,8 @@
"deposit_title": "充值人民币到 %(asset)s",
"withdraw_title": "提现 %(asset)s 到人民币",
"alipay": "支付宝账户名",
"memo": "备注",
"alipay_realname_notice": "提现到支付宝请在备注栏输入实名以供校验",
"withdraw_note": "目前仅支持支付宝提现,将资产按1:1比例兑换成人民币发送到您的支付宝账户中",
"you_will_receive": "您将收到 %(amount)s 元人民币"
},
Expand Down
2 changes: 2 additions & 0 deletions web/app/assets/locales/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,8 @@
"deposit_title": "Deposit RMB to %(asset)s",
"withdraw_title": "Withdraw %(asset)s to RMB",
"alipay": "ALIPAY Account Name",
"memo": "Memo",
"alipay_realname_notice": "Withdraw to Alipay, please provide real name in MEMO field to verify",
"withdraw_note": "Currently only ALIPAY withdraw is supported. Your asset will be converted at 1:1 ratio and send RMB to your ALIPAY account.",
"you_will_receive": "You will receive %(amount)s RMB"
},
Expand Down
3 changes: 2 additions & 1 deletion web/app/components/Account/AccountDepositWithdraw.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,11 @@ class AccountDepositWithdraw extends React.Component {
</tr>
</thead>
<tbody>
<TranswiserDepositWithdraw
{/*<TranswiserDepositWithdraw
issuerAccount="transwiser-wallet"
account={account.get('name')}
receiveAsset="TCNY" />
*/}
<TranswiserDepositWithdraw
issuerAccount="transwiser-wallet"
account={account.get('name')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class TranswiserWithdrawModal extends React.Component {
withdraw_amount:null,
withdraw_address:null,
withdraw_amount_after_fee:null,
balance_error: false
balance_error: false,
memo:""
}

let balanceAmount = null;
Expand All @@ -49,7 +50,10 @@ class TranswiserWithdrawModal extends React.Component {
balance_error: amount > this.balanceAmount
} );
}
}

onWithdrawMemoChanged( e ){
this.setState({ memo:e.target.value });
}

onWithdrawAddressChanged( e ) {
Expand All @@ -65,7 +69,7 @@ class TranswiserWithdrawModal extends React.Component {
this.props.issuerAccount.get("id"),
parseInt(amount * precision, 10),
asset.get("id"),
(this.props.memo_prefix || "") + this.state.withdraw_address
new Buffer((this.props.memo_prefix || "") + this.state.withdraw_address + (this.state.memo != "" ? " (" + this.state.memo + ")" : ""), "utf-8")
)
}

Expand Down Expand Up @@ -121,7 +125,14 @@ class TranswiserWithdrawModal extends React.Component {
</div>
<div className="content-block full-width-content">
<label><Translate component="span" content="gateway.transwiser.alipay"/></label>
<input type="text" value={this.state.withdraw_address || ""} tabIndex="4" onChange={this.onWithdrawAddressChanged.bind(this)} autoComplete="off"/>
<input type="text" value={this.state.withdraw_address || ""} tabIndex="2" onChange={this.onWithdrawAddressChanged.bind(this)} autoComplete="off"/>
</div>
<div className="content-block full-width-content">
<label><Translate component="span" content="gateway.transwiser.memo"/></label>
<input type="text" value={this.state.memo || ""} tabIndex="3" onChange={this.onWithdrawMemoChanged.bind(this)} autoComplete="off"/>
<div className="grid-block">
<Translate content="gateway.transwiser.alipay_realname_notice" />
</div>
</div>

<div className="content-block">
Expand Down