Skip to content

Commit

Permalink
fix: remove subdomain when releasing a username
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos committed Aug 9, 2022
1 parent 148c677 commit e0cd28d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/app_service/service/ens/service.nim
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,11 @@ QtObject:
chainId = self.networkService.getNetworkForEns().chainId
txData = ens_utils.buildTransaction(parseAddress(address), 0.u256)

let resp = status_ens.releaseEstimate(chainId, %txData, ensUsername)
var userNameNoDomain = ensUsername
if ensUsername.endsWith(ens_utils.STATUS_DOMAIN):
userNameNoDomain = ensUsername.replace(ens_utils.STATUS_DOMAIN, "")

let resp = status_ens.releaseEstimate(chainId, %txData, userNameNoDomain)
result = resp.result.getInt
except Exception as e:
error "error occurred", procName="releaseEnsEstimate", msg = e.msg
Expand Down Expand Up @@ -305,7 +309,11 @@ QtObject:
txData = ens_utils.buildTransaction(parseAddress(address), 0.u256, gas, gasPrice,
eip1559Enabled, maxPriorityFeePerGas, maxFeePerGas)

let resp = status_ens.release(chainId, %txData, password, ensUsername)
var userNameNoDomain = ensUsername
if ensUsername.endsWith(ens_utils.STATUS_DOMAIN):
userNameNoDomain = ensUsername.replace(ens_utils.STATUS_DOMAIN, "")

let resp = status_ens.release(chainId, %txData, password, userNameNoDomain)
let hash = resp.result.getStr

let ensUsernamesAddress = self.getEnsRegisteredAddress()
Expand Down

0 comments on commit e0cd28d

Please sign in to comment.