diff --git a/apps/token-manager/app/src/App.js b/apps/token-manager/app/src/App.js index a04618d66e..b06c915636 100644 --- a/apps/token-manager/app/src/App.js +++ b/apps/token-manager/app/src/App.js @@ -37,7 +37,7 @@ class App extends React.PureComponent { ) return holder ? holder.balance : new BN('0') } - handleUpdateTokens = ({ amount, holder, mode }) => { + handleUpdateTokens = ({ amount, holder, to, mode }) => { const { api } = this.props // Don't care about responses @@ -47,6 +47,9 @@ class App extends React.PureComponent { if (mode === 'remove') { api.burn(holder, amount).toPromise() } + if (mode === 'move') { + api.transfer_from_to(holder, to, amount).toPromise() + } this.handleSidepanelClose() } @@ -59,6 +62,15 @@ class App extends React.PureComponent { sidepanelOpened: true, }) } + handleLaunchMoveTokensNoHolder = () => { + this.handleLaunchMoveTokens('') + } + handleLaunchMoveTokens = address => { + this.setState({ + assignTokensConfig: {mode: 'move', holderAddress: address }, + sidepanelOpened: true, + }) + } handleLaunchRemoveTokens = address => { this.setState({ assignTokensConfig: { mode: 'remove', holderAddress: address }, @@ -113,6 +125,7 @@ class App extends React.PureComponent { } secondary={ + <>