From dd93f05a5bb97b942ec3bc46a69306db884fa615 Mon Sep 17 00:00:00 2001 From: tripathyr Date: Sun, 15 Oct 2023 17:11:59 +0530 Subject: [PATCH] Update floCrypto.js --- scripts/floCrypto.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/floCrypto.js b/scripts/floCrypto.js index 6c08e8b..db90758 100644 --- a/scripts/floCrypto.js +++ b/scripts/floCrypto.js @@ -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 } } } @@ -534,4 +538,4 @@ m => String.fromCharCode(parseInt(m.replace(/\\u/g, ''), 16))); } -})('object' === typeof module ? module.exports : window.floCrypto = {}); \ No newline at end of file +})('object' === typeof module ? module.exports : window.floCrypto = {});