Skip to content

Commit

Permalink
Update floCrypto.js
Browse files Browse the repository at this point in the history
  • Loading branch information
tripathyr authored Oct 15, 2023
1 parent 16906d7 commit dd93f05
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/floCrypto.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,13 @@
} else
return null;
} else if ((address.length == 42 && address.startsWith("0x")) || (address.length == 40 && !address.startsWith("0x"))) { //Ethereum Address
if (address.startsWith("0x")) { address = address.substring(2); }
let bytes = Crypto.util.hexToBytes(address);
return {
version: 1,
hex: address,
type: 'ethereum'
type: 'ethereum',
bytes
}
}
}
Expand Down Expand Up @@ -534,4 +538,4 @@
m => String.fromCharCode(parseInt(m.replace(/\\u/g, ''), 16)));
}

})('object' === typeof module ? module.exports : window.floCrypto = {});
})('object' === typeof module ? module.exports : window.floCrypto = {});

0 comments on commit dd93f05

Please sign in to comment.