fix(@desktop/wallet): Properly return token id value (#11792)

This commit is contained in:
Cuteivist 2023-08-04 14:24:28 +02:00 committed by GitHub
parent 44a59f6740
commit f8dd1dc811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -299,9 +299,16 @@ QtObject:
error "getTokenID: ActivityEntry is not a transaction"
return ""
var tokenId: Option[TokenID]
if self.isInTransactionType():
return if self.metadata.tokenIn.isSome(): $self.metadata.tokenIn.unsafeGet().tokenId else: ""
return if self.metadata.tokenOut.isSome(): $self.metadata.tokenOut.unsafeGet().tokenId else: ""
if self.metadata.tokenIn.isSome():
tokenId = self.metadata.tokenIn.unsafeGet().tokenId
elif self.metadata.tokenOut.isSome():
tokenId = self.metadata.tokenOut.unsafeGet().tokenId
if tokenId.isSome():
return $stint.fromHex(UInt256, string(tokenId.unsafeGet()))
return ""
QtProperty[string] tokenID:
read = getTokenID

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit 078f71a23582e4ffe5e52f75317db0b1ad756542
Subproject commit 1f510eae70f00c6daab8eed7395b7fbf4332755e