From 28101f354a56f1234a8c494e82488ae0c5e222d4 Mon Sep 17 00:00:00 2001 From: Dario Gabriel Lipicar Date: Fri, 16 Feb 2024 11:31:11 -0300 Subject: [PATCH] fix(@desktop/Wallet): Fix ERC721 sending --- src/app_service/service/transaction/dto.nim | 1 + src/app_service/service/transaction/service.nim | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/app_service/service/transaction/dto.nim b/src/app_service/service/transaction/dto.nim index 677232e7e6..c3dce2fd41 100644 --- a/src/app_service/service/transaction/dto.nim +++ b/src/app_service/service/transaction/dto.nim @@ -18,6 +18,7 @@ type StickersBuy Bridge ERC721Transfer + ERC1155Transfer type PendingTransactionTypeDto* {.pure.} = enum diff --git a/src/app_service/service/transaction/service.nim b/src/app_service/service/transaction/service.nim index c3ea4442b4..47ffb9725f 100644 --- a/src/app_service/service/transaction/service.nim +++ b/src/app_service/service/transaction/service.nim @@ -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)