Skip to content

Commit

Permalink
chore(browser): show transfer to bind when swapping (#1365)
Browse files Browse the repository at this point in the history
* chore(browser): show transfer to bind when swapping

* chore(app): bump release version
  • Loading branch information
Maurice Dalderup authored Aug 22, 2020
1 parent 24cdf4d commit 2ce921e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"repository": "https://www.github.com/nos/client",
"author": "nOS",
"homepage": "https://nos.io",
"version": "0.6.4",
"version": "0.6.5",
"private": true,
"main": "dist/main/main.js",
"license": "MIT",
Expand Down
14 changes: 11 additions & 3 deletions src/renderer/browser/components/RequestsProcessor/Send/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ const getAssetName = (assetId) => {
return asset ? asset.symbol : assetId;
};

const getReceiver = (receiver, src) => {
if (src === 'https://nos.app/swap') {
return 'BIND';
}

return <span>address &ldquo;{receiver}&rdquo;</span>;
};

const CONFIG_KEYS = ['asset', 'amount', 'receiver', 'remark'];

export default function makeSend(sendActions) {
Expand All @@ -46,10 +54,10 @@ export default function makeSend(sendActions) {

// Prompt user
withPrompt(
({ amount, asset, receiver }) => (
({ amount, asset, receiver, src }) => (
<span>
Would you like to transfer {amount} {getAssetName(asset)} to address{' '}
<strong>&ldquo;{receiver}&rdquo;</strong>?
Would you like to transfer {amount} {getAssetName(asset)} to{' '}
<strong>{getReceiver(receiver, src)}</strong>?
</span>
),
(props) => ({
Expand Down

0 comments on commit 2ce921e

Please sign in to comment.