• R/O
  • HTTP
  • SSH
  • HTTPS

Bytom-JS-SDK: Commit

It is a project for Bytom Chrome extension JS SDK https://bytom.github.io/Bytom-JS-SDK


Commit MetaInfo

Revisiondf63d72ceaaea8d043b61a71b49c56d9289feeae (tree)
Time2020-11-13 11:07:39
AuthorZhiting Lin <zlin035@uott...>
CommiterZhiting Lin

Log Message

update the derivation path are null.

Change Summary

Incremental Difference

--- a/src/utils/account.js
+++ b/src/utils/account.js
@@ -3,5 +3,4 @@ import {decryptKey} from './key/keystore';
33 export function restoreFromKeyStore(v3Keystore, password){
44 const key = decryptKey(v3Keystore, password)
55 return key.xPub;
6-
76 }
--- a/src/utils/transaction/signTransaction.js
+++ b/src/utils/transaction/signTransaction.js
@@ -12,8 +12,10 @@ function signTransaction(transaction, password, keyJSON) {
1212 for(let k = 0; k<tx.signingInstructions.length; k++){
1313 const v = tx.signingInstructions[k];
1414 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+ }
1719 }
1820 for(let d of v.signData ){
1921
Show on old repository browser