mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 14:26:34 +00:00
fix(@wallet): add data field in tx event
This commit is contained in:
parent
bc353a1ccc
commit
36f562243c
@ -137,6 +137,7 @@ const getSuggestedRoutesTask*: Task = proc(argEncoded: string) {.gcsafe, nimcall
|
|||||||
|
|
||||||
type
|
type
|
||||||
WatchTransactionTaskArg* = ref object of QObjectTaskArg
|
WatchTransactionTaskArg* = ref object of QObjectTaskArg
|
||||||
|
data: string
|
||||||
hash: string
|
hash: string
|
||||||
chainId: int
|
chainId: int
|
||||||
address: string
|
address: string
|
||||||
@ -147,6 +148,7 @@ const watchTransactionTask*: Task = proc(argEncoded: string) {.gcsafe, nimcall.}
|
|||||||
try:
|
try:
|
||||||
let output = %*{
|
let output = %*{
|
||||||
"hash": arg.hash,
|
"hash": arg.hash,
|
||||||
|
"data": arg.data,
|
||||||
"address": arg.address,
|
"address": arg.address,
|
||||||
"chainId": arg.chainId,
|
"chainId": arg.chainId,
|
||||||
"trxType": arg.trxType,
|
"trxType": arg.trxType,
|
||||||
@ -156,6 +158,7 @@ const watchTransactionTask*: Task = proc(argEncoded: string) {.gcsafe, nimcall.}
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
let output = %* {
|
let output = %* {
|
||||||
"hash": arg.hash,
|
"hash": arg.hash,
|
||||||
|
"data": arg.data,
|
||||||
"address": arg.address,
|
"address": arg.address,
|
||||||
"chainId": arg.chainId,
|
"chainId": arg.chainId,
|
||||||
"trxType": arg.trxType,
|
"trxType": arg.trxType,
|
||||||
|
@ -147,8 +147,9 @@ QtObject:
|
|||||||
let transactionReceipt = transactions.getTransactionReceipt(chainId, hash).result
|
let transactionReceipt = transactions.getTransactionReceipt(chainId, hash).result
|
||||||
if transactionReceipt != nil and transactionReceipt.kind != JNull:
|
if transactionReceipt != nil and transactionReceipt.kind != JNull:
|
||||||
discard transactions.deletePendingTransaction(chainId, hash)
|
discard transactions.deletePendingTransaction(chainId, hash)
|
||||||
|
echo watchTxResult["data"].getStr
|
||||||
let ev = TransactionMinedArgs(
|
let ev = TransactionMinedArgs(
|
||||||
data: "",
|
data: watchTxResult["data"].getStr,
|
||||||
transactionHash: hash,
|
transactionHash: hash,
|
||||||
chainId: chainId,
|
chainId: chainId,
|
||||||
success: transactionReceipt{"status"}.getStr == "0x1",
|
success: transactionReceipt{"status"}.getStr == "0x1",
|
||||||
@ -171,6 +172,7 @@ QtObject:
|
|||||||
hash: hash,
|
hash: hash,
|
||||||
address: fromAddress,
|
address: fromAddress,
|
||||||
trxType: trxType,
|
trxType: trxType,
|
||||||
|
data: data,
|
||||||
tptr: cast[ByteAddress](watchTransactionTask),
|
tptr: cast[ByteAddress](watchTransactionTask),
|
||||||
vptr: cast[ByteAddress](self.vptr),
|
vptr: cast[ByteAddress](self.vptr),
|
||||||
slot: "watchTransactionResult",
|
slot: "watchTransactionResult",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user