gridplus-sdk
Advanced tools
Comparing version 0.2.1-dev to 0.2.2-dev
{ | ||
"name": "gridplus-sdk", | ||
"version": "0.2.1-dev", | ||
"version": "0.2.2-dev", | ||
"description": "SDK to interact with GridPlus Lattice1 device", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -438,21 +438,23 @@ const superagent = require('superagent'); | ||
let off = 65; | ||
// Internal first | ||
let hasActiveWallet = false; | ||
walletUID = res.slice(off, off+32); | ||
if (!walletUID.equals(EMPTY_WALLET_UID)) { | ||
this.activeWallets.internal.uid = walletUID; | ||
this.activeWallets.internal.capabilities = res.readUInt32BE(off+32); | ||
this.activeWallets.internal.name = res.slice(off+36, off+walletDescriptorLen); | ||
this.activeWallets.internal.uid = walletUID; | ||
this.activeWallets.internal.capabilities = res.readUInt32BE(off+32); | ||
this.activeWallets.internal.name = res.slice(off+36, off+walletDescriptorLen); | ||
if (!walletUID.equals(EMPTY_WALLET_UID)) | ||
hasActiveWallet = true; | ||
} | ||
// Offset the first item | ||
off += walletDescriptorLen; | ||
// External | ||
walletUID = res.slice(off, off+32); | ||
if (!walletUID.equals(EMPTY_WALLET_UID)) { | ||
this.activeWallets.external.uid = walletUID; | ||
this.activeWallets.external.capabilities = res.readUInt32BE(off+32); | ||
this.activeWallets.external.name = res.slice(off+36, off+walletDescriptorLen); | ||
this.activeWallets.external.uid = walletUID; | ||
this.activeWallets.external.capabilities = res.readUInt32BE(off+32); | ||
this.activeWallets.external.name = res.slice(off+36, off+walletDescriptorLen); | ||
if (!walletUID.equals(EMPTY_WALLET_UID)) | ||
hasActiveWallet = true; | ||
} | ||
if (hasActiveWallet === true) | ||
@@ -459,0 +461,0 @@ return null; |
51256
1196