chore: refactor ensRegisterAddress too and update the ui to use utilsModel
This commit is contained in:
parent
25748ce682
commit
968923e8be
|
@ -200,12 +200,6 @@ QtObject:
|
|||
self.endResetModel()
|
||||
self.transactionCompleted(false, transactionHash, ensUsername, $trxType, revertReason)
|
||||
|
||||
proc getEnsRegisterAddress(self: EnsManager): QVariant {.slot.} =
|
||||
newQVariant($statusRegistrarAddress())
|
||||
|
||||
QtProperty[QVariant] ensRegisterAddress:
|
||||
read = getEnsRegisterAddress
|
||||
|
||||
proc registerENSGasEstimate(self: EnsManager, ensUsername: string, address: string): int {.slot.} =
|
||||
var success: bool
|
||||
let pubKey = status_settings.getSetting[string](Setting.PublicKey, "0x0")
|
||||
|
|
|
@ -5,6 +5,7 @@ import ../../status/libstatus/accounts/constants as accountConstants
|
|||
import ../../status/libstatus/tokens
|
||||
import ../../status/libstatus/wallet as status_wallet
|
||||
import ../../status/libstatus/utils as status_utils
|
||||
import ../../status/ens as status_ens
|
||||
|
||||
QtObject:
|
||||
type UtilsView* = ref object of QObject
|
||||
|
@ -49,3 +50,9 @@ QtObject:
|
|||
|
||||
QtProperty[QVariant] stickerMarketAddress:
|
||||
read = getStickerMarketAddress
|
||||
|
||||
proc getEnsRegisterAddress(self: UtilsView): QVariant {.slot.} =
|
||||
newQVariant($statusRegistrarAddress())
|
||||
|
||||
QtProperty[QVariant] ensRegisterAddress:
|
||||
read = getEnsRegisterAddress
|
||||
|
|
|
@ -87,7 +87,7 @@ ModalPopup {
|
|||
visible: false
|
||||
accounts: walletModel.accounts
|
||||
contacts: profileModel.addedContacts
|
||||
selectedRecipient: { "address": profileModel.ens.ensRegisterAddress, "type": RecipientSelector.Type.Address }
|
||||
selectedRecipient: { "address": utilsModel.ensRegisterAddress, "type": RecipientSelector.Type.Address }
|
||||
readOnly: true
|
||||
onSelectedRecipientChanged: gasSelector.estimateGas()
|
||||
}
|
||||
|
|
|
@ -92,7 +92,7 @@ ModalPopup {
|
|||
visible: false
|
||||
accounts: walletModel.accounts
|
||||
contacts: profileModel.addedContacts
|
||||
selectedRecipient: { "address": profileModel.ens.ensRegisterAddress, "type": RecipientSelector.Type.Address }
|
||||
selectedRecipient: { "address": utilsModel.ensRegisterAddress, "type": RecipientSelector.Type.Address }
|
||||
readOnly: true
|
||||
onSelectedRecipientChanged: gasSelector.estimateGas()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue