fix(@desktop/Wallet): Fix ERC721 sending

This commit is contained in:
Dario Gabriel Lipicar 2024-02-16 11:31:11 -03:00 committed by dlipicar
parent 4a3eb4ce18
commit 28101f354a
2 changed files with 10 additions and 6 deletions

View File

@ -18,6 +18,7 @@ type
StickersBuy
Bridge
ERC721Transfer
ERC1155Transfer
type
PendingTransactionTypeDto* {.pure.} = enum

View File

@ -468,13 +468,16 @@ QtObject:
chainID = selectedRoutes[0].fromNetwork.chainID
var tokenSymbol = ""
let token = self.tokenService.getTokenBySymbolByTokensKey(assetKey)
if token != nil:
tokenSymbol = token.symbol
if sendType == ERC721Transfer or sendType == ERC1155Transfer:
tokenSymbol = assetKey
else:
let token = self.tokenService.getTokenBySymbolByTokensKey(assetKey)
if token != nil:
tokenSymbol = token.symbol
let network = self.networkService.getNetwork(chainID)
if network.nativeCurrencySymbol == tokenSymbol:
isEthTx = true
let network = self.networkService.getNetwork(chainID)
if network.nativeCurrencySymbol == tokenSymbol:
isEthTx = true
if(isEthTx):
self.transferEth(fromAddr, toAddr, tokenSymbol, value, uuid, selectedRoutes, finalPassword)