Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@desktop/Wallet): Fix ERC721 sending #13605

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/app_service/service/transaction/dto.nim
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type
StickersBuy
Bridge
ERC721Transfer
ERC1155Transfer

type
PendingTransactionTypeDto* {.pure.} = enum
Expand Down
15 changes: 9 additions & 6 deletions src/app_service/service/transaction/service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down