fix(@desktop/wallet): Wallet: Send a multi tx, the notification for the 2nd transfer is not visible
fixes #12242
This commit is contained in:
parent
e805a9bf26
commit
91de960e08
|
@ -423,6 +423,10 @@ proc connectForNotificationsOnly[T](self: Module[T]) =
|
|||
kpName = args.keypairs[0].name
|
||||
self.view.showToastKeypairsImported(kpName, args.keypairs.len, args.error)
|
||||
|
||||
self.events.on(SIGNAL_TRANSACTION_SENT) do(e:Args):
|
||||
let args = TransactionSentArgs(e)
|
||||
self.view.showToastTransactionSent(args.chainId, args.txHash, args.uuid, args.error)
|
||||
|
||||
method load*[T](
|
||||
self: Module[T],
|
||||
events: EventEmitter,
|
||||
|
|
|
@ -296,6 +296,7 @@ QtObject:
|
|||
proc showIncludeWatchOnlyAccountUpdated*(self: View, includeWatchOnly: bool) {.signal.}
|
||||
proc showToastKeypairRemoved*(self: View, keypairName: string) {.signal.}
|
||||
proc showToastKeypairsImported*(self: View, keypairName: string, keypairsCount: int, error: string) {.signal.}
|
||||
proc showToastTransactionSent*(self: View, chainId: int, txHash: string, uuid: string, error: string) {.signal.}
|
||||
|
||||
## Used in test env only, for testing keycard flows
|
||||
proc registerMockedKeycard*(self: View, cardIndex: int, readerState: int, keycardState: int,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import NimQml, Tables, strutils, strformat, sequtils, sugar, json
|
||||
import NimQml, Tables, strutils, strformat, sequtils, sugar, json, stint
|
||||
|
||||
import app/modules/shared_models/currency_amount
|
||||
import ./network_item, ./suggested_route_item
|
||||
|
@ -181,7 +181,7 @@ QtObject:
|
|||
let index = self.createIndex(i, 0, nil)
|
||||
defer: index.delete
|
||||
if self.items[i].getAmountOut().len != 0:
|
||||
self.items[i].amountOut = $(parseInt(self.items[i].getAmountOut()) + parseInt(path.getAmountOut()))
|
||||
self.items[i].amountOut = $(stint.u256(self.items[i].getAmountOut()) + stint.u256(path.getAmountOut()))
|
||||
else:
|
||||
self.items[i].amountOut = path.getAmountOut()
|
||||
self.dataChanged(index, index, @[ModelRole.AmountOut.int])
|
||||
|
|
|
@ -167,8 +167,8 @@ QtObject {
|
|||
|
||||
property var allNetworks: networksModule.all
|
||||
|
||||
function getEtherscanLink() {
|
||||
return profileSectionModule.ensUsernamesModule.getEtherscanLink()
|
||||
function getEtherscanLink(chainID) {
|
||||
return allNetworks.getBlockExplorerURL(chainID)
|
||||
}
|
||||
|
||||
function createCommunity(communityName, communityDescription, checkedMembership, communityColor, communityTags,
|
||||
|
|
|
@ -181,6 +181,17 @@ Item {
|
|||
""
|
||||
)
|
||||
}
|
||||
|
||||
function onShowToastTransactionSent(chainId: int, txHash: string, uuid: string, error: string) {
|
||||
if (!error) {
|
||||
Global.displayToastMessage(qsTr("Transaction pending..."),
|
||||
qsTr("View on etherscan"),
|
||||
"",
|
||||
true,
|
||||
Constants.ephemeralNotificationType.normal,
|
||||
"%1/%2".arg(appMain.rootStore.getEtherscanLink(chainId)).arg(txHash))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QtObject {
|
||||
|
|
|
@ -519,13 +519,6 @@ StatusDialog {
|
|||
sendingError.text = error
|
||||
return sendingError.open()
|
||||
}
|
||||
let url = "%1/%2".arg(popup.store.getEtherscanLink(chainId)).arg(txHash)
|
||||
Global.displayToastMessage(qsTr("Transaction pending..."),
|
||||
qsTr("View on etherscan"),
|
||||
"",
|
||||
true,
|
||||
Constants.ephemeralNotificationType.normal,
|
||||
url)
|
||||
popup.close()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue