chore(wallet): split multitransaction command from full struct
Part of #10791
This commit is contained in:
parent
8102600c5b
commit
39a5a67937
|
@ -359,7 +359,7 @@ QtObject:
|
|||
paths.add(self.createPath(route, txData, tokenSymbol, to_addr))
|
||||
|
||||
let response = transactions.createMultiTransaction(
|
||||
MultiTransactionDto(
|
||||
MultiTransactionCommandDto(
|
||||
fromAddress: from_addr,
|
||||
toAddress: to_addr,
|
||||
fromAsset: tokenSymbol,
|
||||
|
@ -426,7 +426,7 @@ QtObject:
|
|||
paths.add(self.createPath(route, txData, tokenSymbol, to_addr))
|
||||
|
||||
let response = transactions.createMultiTransaction(
|
||||
MultiTransactionDto(
|
||||
MultiTransactionCommandDto(
|
||||
fromAddress: from_addr,
|
||||
toAddress: to_addr,
|
||||
fromAsset: tokenSymbol,
|
||||
|
|
|
@ -9,6 +9,14 @@ type
|
|||
MultiTransactionType* = enum
|
||||
MultiTransactionSend = 0, MultiTransactionSwap = 1, MultiTransactionBridge = 2
|
||||
|
||||
MultiTransactionCommandDto* = ref object of RootObj
|
||||
fromAddress* {.serializedFieldName("fromAddress").}: string
|
||||
toAddress* {.serializedFieldName("toAddress").}: string
|
||||
fromAsset* {.serializedFieldName("fromAsset").}: string
|
||||
toAsset* {.serializedFieldName("toAsset").}: string
|
||||
fromAmount* {.serializedFieldName("fromAmount").}: string
|
||||
multiTxType* {.serializedFieldName("type").}: MultiTransactionType
|
||||
|
||||
MultiTransactionDto* = ref object of RootObj
|
||||
id* {.serializedFieldName("id").}: int
|
||||
timestamp* {.serializedFieldName("timestamp").}: int
|
||||
|
@ -60,8 +68,8 @@ proc deletePendingTransaction*(chainId: int, transactionHash: string): RpcRespon
|
|||
proc fetchCryptoServices*(): RpcResponse[JsonNode] {.raises: [Exception].} =
|
||||
result = core.callPrivateRPC("wallet_getCryptoOnRamps", %* [])
|
||||
|
||||
proc createMultiTransaction*(multiTransaction: MultiTransactionDto, data: seq[TransactionBridgeDto], password: string): RpcResponse[JsonNode] {.raises: [Exception].} =
|
||||
let payload = %* [multiTransaction, data, hashPassword(password)]
|
||||
proc createMultiTransaction*(multiTransactionCommand: MultiTransactionCommandDto, data: seq[TransactionBridgeDto], password: string): RpcResponse[JsonNode] {.raises: [Exception].} =
|
||||
let payload = %* [multiTransactionCommand, data, hashPassword(password)]
|
||||
result = core.callPrivateRPC("wallet_createMultiTransaction", payload)
|
||||
|
||||
proc getMultiTransactions*(transactionIDs: seq[int]): RpcResponse[JsonNode] {.raises: [Exception].} =
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit d8eb038d7d7026aeece4775771bbb4bcf00c88dc
|
||||
Subproject commit ffc959a9e3a885c80b95d919523d0dd53e27309a
|
Loading…
Reference in New Issue