Changeset View
Changeset View
Standalone View
Standalone View
cashtab/src/utils/cashMethods.js
Show All 33 Lines | |||||
/** | /** | ||||
* Get hash values to use for chronik calls | * Get hash values to use for chronik calls | ||||
* @param {object} wallet valid cashtab wallet | * @param {object} wallet valid cashtab wallet | ||||
* @returns {string[]} array of hashes of all addresses in wallet | * @returns {string[]} array of hashes of all addresses in wallet | ||||
*/ | */ | ||||
export const getHashArrayFromWallet = wallet => { | export const getHashArrayFromWallet = wallet => { | ||||
const hashArray = []; | const hashArray = []; | ||||
for (const path of wallet.paths) { | wallet.paths.forEach(pathInfo => { | ||||
hashArray.push(path.hash); | hashArray.push(pathInfo.hash); | ||||
} | }); | ||||
return hashArray; | return hashArray; | ||||
}; | }; |