It is a project for Bytom Chrome extension JS SDK https://bytom.github.io/Bytom-JS-SDK
リビジョン | df63d72ceaaea8d043b61a71b49c56d9289feeae (tree) |
---|---|
日時 | 2020-11-13 11:07:39 |
作者 | Zhiting Lin <zlin035@uott...> |
コミッター | Zhiting Lin |
update the derivation path are null.
@@ -3,5 +3,4 @@ import {decryptKey} from './key/keystore'; | ||
3 | 3 | export function restoreFromKeyStore(v3Keystore, password){ |
4 | 4 | const key = decryptKey(v3Keystore, password) |
5 | 5 | return key.xPub; |
6 | - | |
7 | 6 | } |
@@ -12,8 +12,10 @@ function signTransaction(transaction, password, keyJSON) { | ||
12 | 12 | for(let k = 0; k<tx.signingInstructions.length; k++){ |
13 | 13 | const v = tx.signingInstructions[k]; |
14 | 14 | let path = []; |
15 | - for(let i = 0; i< v.derivationPath.length; i++ ){ | |
16 | - path[i] = Buffer.from(v.derivationPath[i],"hex"); | |
15 | + if(v.derivationPath){ | |
16 | + for(let i = 0; i< v.derivationPath.length; i++ ){ | |
17 | + path[i] = Buffer.from(v.derivationPath[i],"hex"); | |
18 | + } | |
17 | 19 | } |
18 | 20 | for(let d of v.signData ){ |
19 | 21 |