Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Turtus committed Mar 17, 2023
1 parent f1d97ef commit 79ef792
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions crypto/actions/BlocksoftTransfer/BlocksoftTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,23 @@ export namespace BlocksoftTransfer {
if (config.debug.sendLogs) {
console.log('BlocksoftTransfer.sendTx', data, uiData)
}

const lower = data.addressTo.toLowerCase()
if (!data?.walletConnectData?.data) {
for (const key in CoinBlocksoftDict) {
const tmp = CoinBlocksoftDict[key]
if (typeof tmp.canBeDestination !== 'undefined' && tmp.canBeDestination) {
continue
}
if (tmp?.tokenName && tmp?.tokenName.toLowerCase() === lower) {
throw new Error('SERVER_RESPONSE_CONTRACT_DESTINATION_INVALID')
}
if (tmp?.tokenAddress && tmp?.tokenAddress.toLowerCase() === lower) {
throw new Error('SERVER_RESPONSE_CONTRACT_DESTINATION_INVALID')
}
}
}

data.derivationPath = data.derivationPath.replace(/quote/g, '\'')

const bseOrderId = typeof uiData !== 'undefined' && uiData && typeof uiData.selectedFee !== 'undefined' && typeof uiData.selectedFee.bseOrderId !== 'undefined' ? uiData.selectedFee.bseOrderId : false
Expand Down

0 comments on commit 79ef792

Please sign in to comment.