From 4a43057f3c8a25ce93c01618e391395433a84738 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Sun, 14 Feb 2021 10:56:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20seed2path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 2bdf213..48307cf 100644 --- a/index.js +++ b/index.js @@ -463,15 +463,15 @@ class TICrypto { let part3 = parseInt(hash.slice(18, 24), 16) let part4 = parseInt(hash.slice(24, 30), 16) let path = `${part0}'/${part1}/${part2}/${part3}/${part4}/${part5}` - if (coin) coin = coin.toUpperCase() - switch (coin) { + switch (coin.toUpperCase()) { case 'BTC': return `m/44'/0'/${path}` case 'ETH': return `m/44'/60'/${path}` case 'TIC': - default: return `m/44'/60000'/${path}` + default: + return '' } }