Skip to content

Commit

Permalink
Merge pull request #102 from fioprotocol/develop
Browse files Browse the repository at this point in the history
Development > Main Release 1.7.2
  • Loading branch information
ericbutz authored Aug 2, 2021
2 parents d8c3c4b + 31412ee commit 32c2239
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api/fio-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class FioClient {
*/
async isAccountRegistered(address) {
await this.init
address = address.replace(/:/, '@')
address = address.replace(/:/, '@').toLowerCase()
const isAddress = address.indexOf('@') > 0

const hash = crypto.createHash('sha1')
Expand Down Expand Up @@ -69,7 +69,7 @@ class FioClient {

async isAccountCouldBeRenewed(address) {
await this.init
address = address.replace(/:/, '@')
address = address.replace(/:/, '@').toLowerCase()
const isAddress = address.indexOf('@') > 0

const hash = crypto.createHash('sha1')
Expand All @@ -94,7 +94,7 @@ class FioClient {
async isDomainPublic(domain) {
await this.init
const hash = crypto.createHash('sha1')
const bound = '0x' + hash.update(domain).digest().slice(0,16).reverse().toString("hex")
const bound = '0x' + hash.update(domain.toLowerCase()).digest().slice(0,16).reverse().toString("hex")
const result = await this.chain.post('/get_table_rows', {
code: 'fio.address',
scope: 'fio.address',
Expand Down Expand Up @@ -177,7 +177,7 @@ class FioClient {
async getPubAddressByDomain(domain) {
await this.init
const hash = crypto.createHash('sha1')
const bound = '0x' + hash.update(domain).digest().slice(0,16).reverse().toString("hex")
const bound = '0x' + hash.update(domain.toLowerCase()).digest().slice(0,16).reverse().toString("hex")
const result = await this.chain.post('/get_table_rows', {
code: 'fio.address',
scope: 'fio.address',
Expand Down

0 comments on commit 32c2239

Please sign in to comment.