feat(@desktop/browser): wrong screen is shown when claiming tokens in simpledapp.eth
Reverted changes done in `991e04ef955f853cb34efddc3d1ef2529f2d0375` PR: https://github.com/status-im/status-desktop/pull/5502 Fixes #5721
This commit is contained in:
parent
db3722cd4f
commit
04b864ddd2
|
@ -152,28 +152,28 @@ Rectangle {
|
||||||
return _internal.accessDialogComponent.createObject(browserWindow)
|
return _internal.accessDialogComponent.createObject(browserWindow)
|
||||||
}
|
}
|
||||||
createSendTransactionModalComponent: function(request) {
|
createSendTransactionModalComponent: function(request) {
|
||||||
browserWindow.sendTransactionModal.selectedAccount = {
|
return _internal.sendTransactionModalComponent.createObject(browserWindow, {
|
||||||
name: WalletStore.dappBrowserAccount.name,
|
trxData: request.payload.params[0].data || "",
|
||||||
address: request.payload.params[0].from,
|
selectedAccount: {
|
||||||
iconColor: WalletStore.dappBrowserAccount.color,
|
name: WalletStore.dappBrowserAccount.name,
|
||||||
assets: WalletStore.dappBrowserAccount.assets
|
address: request.payload.params[0].from,
|
||||||
}
|
iconColor: WalletStore.dappBrowserAccount.color,
|
||||||
browserWindow.sendTransactionModal.selectedRecipient = {
|
assets: WalletStore.dappBrowserAccount.assets
|
||||||
address: request.payload.params[0].to,
|
},
|
||||||
identicon: "",
|
selectedRecipient: {
|
||||||
name: RootStore.activeChannelName,
|
address: request.payload.params[0].to,
|
||||||
type: RecipientSelector.Type.Address
|
identicon: "",
|
||||||
}
|
name: RootStore.activeChannelName,
|
||||||
|
type: RecipientSelector.Type.Address
|
||||||
browserWindow.sendTransactionModal.selectedAmountAsset = {
|
},
|
||||||
name: "ETH",
|
selectedAsset: {
|
||||||
symbol: "ETH",
|
name: "ETH",
|
||||||
address: Constants.zeroAddress
|
symbol: "ETH",
|
||||||
}
|
address: Constants.zeroAddress
|
||||||
browserWindow.sendTransactionModal.selectedAmount = RootStore.getWei2Eth(request.payload.params[0].value, 18)
|
},
|
||||||
|
selectedFiatAmount: "42", // TODO calculate that
|
||||||
|
selectedAmount: RootStore.getWei2Eth(request.payload.params[0].value, 18)
|
||||||
browserWindow.sendTransactionModal.open()
|
})
|
||||||
}
|
}
|
||||||
createSignMessageModalComponent: function(request) {
|
createSignMessageModalComponent: function(request) {
|
||||||
return _internal.signMessageModalComponent.createObject(browserWindow, {
|
return _internal.signMessageModalComponent.createObject(browserWindow, {
|
||||||
|
|
|
@ -848,9 +848,6 @@ Item {
|
||||||
this.active = false
|
this.active = false
|
||||||
}
|
}
|
||||||
property var selectedAccount
|
property var selectedAccount
|
||||||
property var selectedRecipient
|
|
||||||
property var selectedAmount
|
|
||||||
property var selectedAmountAsset
|
|
||||||
sourceComponent: SendModal {
|
sourceComponent: SendModal {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
store: appMain.rootStore
|
store: appMain.rootStore
|
||||||
|
@ -867,15 +864,6 @@ Item {
|
||||||
if (!!sendModal.selectedAccount) {
|
if (!!sendModal.selectedAccount) {
|
||||||
item.preSelectedAccount = sendModal.selectedAccount
|
item.preSelectedAccount = sendModal.selectedAccount
|
||||||
}
|
}
|
||||||
if (!!sendModal.selectedRecipient) {
|
|
||||||
item.preSelectedRecipient = sendModal.selectedRecipient
|
|
||||||
}
|
|
||||||
if (!!sendModal.selectedAmount) {
|
|
||||||
item.advancedHeader.amountToSendInput.text = sendModal.selectedAmount
|
|
||||||
}
|
|
||||||
if (!!sendModal.selectedAmountAsset) {
|
|
||||||
item.advancedHeader.assetSelector.selectedAsset = sendModal.selectedAmountAsset
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue