Skip to content

Commit

Permalink
updated add account for stacks addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
SDargarh committed May 31, 2024
1 parent 1c7722e commit 6092ad3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib/keyring.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,15 @@ class Keyring {

this[this.chain] = keyringInstance;

const { address } = await this[this.chain].addAccount();
if(this.chain === "stacks") {
newAddress = (await this[this.chain].generateWallet()).address;
} else {
const { address } = await this[this.chain].addAccount();

newAddress = address;
newAddress = address;
}

const publicData = [ { address, isDeleted: false, isImported: false, label: `${labelPrefix} Wallet ${acc.response ? acc.response.length + 1 : 1}` } ];
const publicData = [ { address: newAddress, isDeleted: false, isImported: false, label: `${labelPrefix} Wallet ${acc.response ? acc.response.length + 1 : 1}` } ];
this.decryptedVault[this.chain] = { public: publicData, numberOfAccounts: 1 };
} else {
const { address } = await this[this.chain].addAccount();
Expand Down

1 comment on commit 6092ad3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage Report (73%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files72.964.7983.7873.66 
chains100100100100 
   index.js100100100100 
config100100100100 
   index.js100100100100 
constants100100100100 
   index.js100100100100 
constants/responses100100100100 
   index.js100100100100 
lib70.5964.9481.6671.25 
   keyring.js66.3962.3379.5967.0145, 58, 67–68, 139–151, 171, 179–188, 198–201, 246–282, 293, 297, 302–304, 316–391, 407–445, 508–511, 654, 681–726, 799, 816–817, 833–835, 866–874, 897–901, 921–925, 944–952, 979, 985
   vault.js92.5585.4190.992.5521, 28, 43–46, 66, 76
utils80.5363.6392.8581.81 
   helper.js80.5363.6392.8581.819–16, 51–52, 77, 91, 103–105, 114–115, 131–133, 154, 166, 178

Please sign in to comment.