Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature bitcoin version update #303

Merged
merged 2 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -619,4 +619,9 @@

### 2.4.4 (2024-01-24)

* Updated bitcoin controller version with proxy service integrated
* Updated bitcoin controller version with proxy service integrated

### 2.4.5 (2024-01-30)

* Updated bitcoin controller version with network param for signing
* Updated restore keyring state and vault structure in recover vault function for bitcoin
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@getsafle/safle-vault",
"version": "2.4.4",
"version": "2.4.5",
"description": "Safle Vault is a non-custodial, flexible and highly available crypto wallet which can be used to access dapps, send/receive crypto and store identity. Vault SDK is used to manage the vault and provide methods to generate vault, add new accounts, update the state and also enable the user to perform several vault related operations.",
"main": "src/index.js",
"scripts": {
Expand Down Expand Up @@ -50,7 +50,7 @@
"@getsafle/vault-arbitrum-controller": "^1.0.8",
"@getsafle/vault-avalanche-controller": "^1.2.1",
"@getsafle/vault-base-controller": "^1.0.1",
"@getsafle/vault-bitcoin-controller": "^2.0.6",
"@getsafle/vault-bitcoin-controller": "^2.0.7",
"@getsafle/vault-bsc-controller": "^1.2.4",
"@getsafle/vault-eth-controller": "^1.4.6",
"@getsafle/vault-mantle-controller": "^1.0.1",
Expand Down
13 changes: 0 additions & 13 deletions src/lib/keyring.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ class Keyring {

const numberOfAcc = this.decryptedVault[chainData.chain.toLowerCase()].numberOfAccounts;


for (let i = 0; i < numberOfAcc; i++) {
await this[chainData.chain].addAccount();
}
Expand Down Expand Up @@ -503,18 +502,6 @@ class Keyring {
decryptedkeyring[0].opts.numberOfAccounts = numberOfAcc;
}

// restoring keyring for other chains
const nonEvmChainList = Object.keys(Chains.nonEvmChains);
for ( let chainData of nonEvmChainList) {
if(this.decryptedVault[chainData]) {
numberOfAcc = this.decryptedVault[chainData].numberOfAcc
if(numberOfAcc >= 1) {
for(let i=0; i < numberOfAcc; i++) {
this[chainData].addAccount();
}
}
}
}
}

async deleteAccount(encryptionKey, address, pin) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/vault.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class Vault extends Keyring {
const accArray = await helper.getAccountsFromLogs(keyringInstance, vaultState, recoverMechanism, logs);
const numberOfAcc = accArray.length;

rawVault[chainData.toLowerCase()] = { public: accArray, numberOfAcc }
rawVault[chainData.toLowerCase()] = { public: accArray, numberOfAccounts: numberOfAcc }

}

Expand Down
Loading