2022-01-17 08:56:44 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
property var ensUsernamesModule
|
|
|
|
|
|
|
|
property var ensUsernamesModel: root.ensUsernamesModule ? ensUsernamesModule.model : []
|
|
|
|
|
|
|
|
property string pubkey: userProfile.pubKey
|
|
|
|
property string icon: userProfile.icon
|
|
|
|
property bool isIdenticon: userProfile.isIdenticon
|
|
|
|
property string preferredUsername: userProfile.preferredName
|
|
|
|
|
|
|
|
property string username: userProfile.username
|
|
|
|
property string gasPrice: root.ensUsernamesModule ? ensUsernamesModule.gasPrice : "0"
|
|
|
|
|
|
|
|
property var walletAccounts: walletSectionAccounts.model
|
|
|
|
|
|
|
|
function setPrefferedEnsUsername(ensName) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return
|
|
|
|
ensUsernamesModule.setPrefferedEnsUsername(ensName)
|
|
|
|
}
|
|
|
|
|
|
|
|
function checkEnsUsernameAvailability(ensName, isStatus) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return
|
|
|
|
ensUsernamesModule.checkEnsUsernameAvailability(ensName, isStatus)
|
|
|
|
}
|
|
|
|
|
|
|
|
function numOfPendingEnsUsernames() {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return 0
|
|
|
|
ensUsernamesModule.numOfPendingEnsUsernames()
|
|
|
|
}
|
|
|
|
|
|
|
|
function ensDetails(ensUsername) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
ensUsernamesModule.fetchDetailsForEnsUsername(ensUsername)
|
|
|
|
}
|
|
|
|
|
|
|
|
function fetchGasPrice() {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return "0"
|
|
|
|
ensUsernamesModule.fetchGasPrice()
|
|
|
|
}
|
|
|
|
|
|
|
|
function setPubKeyGasEstimate(ensUsername, address) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return 0
|
|
|
|
return ensUsernamesModule.setPubKeyGasEstimate(ensUsername, address)
|
|
|
|
}
|
|
|
|
|
|
|
|
function setPubKey(ensUsername, address, gas, gasPrice, maxPriorityFeePerGas, maxFeePerGas, password) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.setPubKey(ensUsername, address, gas, gasPrice, maxPriorityFeePerGas, maxFeePerGas, password)
|
|
|
|
}
|
|
|
|
|
|
|
|
function getEtherscanLink() {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.getEtherscanLink()
|
|
|
|
}
|
|
|
|
|
|
|
|
function getSigningPhrase() {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.getSigningPhrase()
|
|
|
|
}
|
|
|
|
|
|
|
|
function copyToClipboard(value) {
|
|
|
|
globalUtils.copyToClipboard(value)
|
|
|
|
}
|
|
|
|
|
|
|
|
function releaseEnsEstimate(ensUsername, address) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.releaseEnsEstimate(ensUsername, address)
|
|
|
|
}
|
|
|
|
|
|
|
|
function releaseEns(ensUsername, address, gasLimit, gasPrice, password) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.releaseEns(ensUsername, address, gasLimit, gasPrice, password)
|
|
|
|
}
|
|
|
|
|
|
|
|
function ensConnectOwnedUsername(name, isStatus) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return
|
|
|
|
ensUsernamesModule.connectOwnedUsername(name, isStatus)
|
|
|
|
}
|
|
|
|
|
|
|
|
function getEnsRegisteredAddress() {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.getEnsRegisteredAddress()
|
|
|
|
}
|
|
|
|
|
|
|
|
function registerEnsGasEstimate(ensUsername, address) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return 0
|
|
|
|
return ensUsernamesModule.registerEnsGasEstimate(ensUsername, address)
|
|
|
|
}
|
|
|
|
|
2022-02-09 16:39:10 +00:00
|
|
|
function registerEns(ensUsername, address, gasLimit, gasPrice, tipLimit, overallLimit, password) {
|
2022-01-17 08:56:44 +00:00
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
2022-02-09 16:39:10 +00:00
|
|
|
return ensUsernamesModule.registerEns(ensUsername, address, gasLimit, gasPrice, tipLimit, overallLimit, password)
|
2022-01-17 08:56:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function getEnsRegistry() {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.getEnsRegistry()
|
|
|
|
}
|
|
|
|
|
|
|
|
function getSntBalance() {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.getSNTBalance()
|
|
|
|
}
|
|
|
|
|
|
|
|
function getWalletDefaultAddress() {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.getWalletDefaultAddress()
|
|
|
|
}
|
|
|
|
|
|
|
|
function getCurrentCurrency() {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.getCurrentCurrency()
|
|
|
|
}
|
|
|
|
|
|
|
|
function getFiatValue(balance, cryptoSymbo, fiatSymbol) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.getFiatValue(balance, cryptoSymbo, fiatSymbol)
|
|
|
|
}
|
|
|
|
|
|
|
|
function getGasEthValue(gweiValue, gasLimit) {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.getGasEthValue(gweiValue, gasLimit)
|
|
|
|
}
|
|
|
|
|
|
|
|
function getStatusToken() {
|
|
|
|
if(!root.ensUsernamesModule)
|
|
|
|
return ""
|
|
|
|
return ensUsernamesModule.getStatusToken()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|