fix(@desktop/wallet): Fix register ENS flow which is currently broken

This commit is contained in:
Khushboo Mehta 2024-08-14 14:49:17 +02:00 committed by Anthony Laibe
parent d61aece5ff
commit 8050d2b274
4 changed files with 18 additions and 0 deletions

View File

@ -126,6 +126,8 @@ Item {
preDefinedAmountToSend: LocaleUtils.numberToLocaleString(0)
preSelectedHoldingID: Constants.ethToken
preSelectedHoldingType: Constants.TokenType.ERC20
publicKey: root.contactsStore.myPublicKey
ensName: root.username
sendTransaction: function() {
if(bestRoutes.count === 1) {
let path = bestRoutes.firstItem()

View File

@ -72,6 +72,8 @@ Item {
preDefinedAmountToSend: LocaleUtils.numberToLocaleString(0)
preSelectedHoldingID: Constants.ethToken
preSelectedHoldingType: Constants.TokenType.ERC20
publicKey: root.contactsStore.myPublicKey
ensName: ensUsername.text
sendTransaction: function() {
if(bestRoutes.count === 1) {
let path = bestRoutes.firstItem()

View File

@ -76,6 +76,8 @@ Item {
preDefinedAmountToSend: LocaleUtils.numberToLocaleString(10)
preSelectedHoldingID: !!d.sntToken && !!d.sntToken.symbol ? d.sntToken.symbol: ""
preSelectedHoldingType: Constants.TokenType.ERC20
publicKey: root.contactsStore.myPublicKey
ensName: root.username
sendTransaction: function() {
if(bestRoutes.count === 1) {
let path = bestRoutes.firstItem()

View File

@ -42,6 +42,10 @@ StatusDialog {
property string preDefinedAmountToSend
property string stickersPackId
// needed for registering ENS
property string publicKey
property string ensName
// token symbol
property string preSelectedHoldingID
property int preSelectedHoldingType: Constants.TokenType.Unknown
@ -256,6 +260,14 @@ StatusDialog {
if (!!popup.stickersPackId) {
d.extraParamsJson = "{\"%1\":\"%2\"}".arg(Constants.suggestedRoutesExtraParamsProperties.packId).arg(popup.stickersPackId)
}
if (!!popup.ensName && !!popup.publicKey) {
d.extraParamsJson = "{\"%1\":\"%2\",\"%3\":\"%4\"}"
.arg(Constants.suggestedRoutesExtraParamsProperties.username)
.arg(popup.ensName)
.arg(Constants.suggestedRoutesExtraParamsProperties.publicKey)
.arg(popup.publicKey)
}
}
onClosed: popup.store.resetStoredProperties()