Skip to content

Commit

Permalink
Merge pull request #367 from getsafle/test
Browse files Browse the repository at this point in the history
test -> main Integrated the following chains to safle-vault opBNB, Ronin, Sei Skale - Nebula, Immutable zk-EVM
  • Loading branch information
sshubhamagg authored Dec 17, 2024
2 parents cb28230 + 26699ec commit 408ff84
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -676,3 +676,7 @@
-Resolved issue for unarchival of a wallet
-Adding test for bitcoin
-Adding sensitive info in env github pipeline

### 2.9.3 (2024-12-10)

-Integrated the following chains to safle-vault opBNB, Ronin, Sei Skale - Nebula, Immutable zk-EVM
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@getsafle/safle-vault",
"version": "2.9.2",
"version": "2.9.3",
"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
5 changes: 5 additions & 0 deletions src/chains/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ const evmChains = {
zkEVM: { symbol: "ZKEVM", txType: 2 },
bevm: { symbol: "BTC", txType: 0 },
rootstock: { symbol: "RBTC", txType: 0 },
opbnb: { symbol: "BNB", txType: 0 },
sei: { symbol: "SEI", txType: 0 },
ronin: { symbol: "RON", txType: 0 },
nebula: { symbol: "sFUEL", txType: 0 },
immutable: { symbol: "IMX", txType: 0 },
};

const nonEvmChains = {
Expand Down
30 changes: 30 additions & 0 deletions src/lib/test/keyring.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,26 @@ let NETWORKS = {
URL: "https://public-node.testnet.rsk.co",
CHAIN_ID: 31,
},
opbnb: {
URL: "https://opbnb-rpc.publicnode.com",
CHAIN_ID: 204,
},
sei: {
URL: "https://evm-rpc.sei-apis.com",
CHAIN_ID: 1329,
},
ronin: {
URL: "https://ronin.lgns.net/rpc",
CHAIN_ID: 2020,
},
nebula: {
URL: "https://mainnet.skalenodes.com/v1/green-giddy-denebola",
CHAIN_ID: 1482601649,
},
immutable: {
URL: "https://rpc.immutable.com",
CHAIN_ID: 13371,
},
};

const chainConfigs = {
Expand All @@ -73,6 +93,11 @@ const chainConfigs = {
bevm: { symbol: "BTC", txType: 0 },
rootstock: { symbol: "RBTC", txType: 0 },
bitcoin: { symbol: "BTC", txType: 0 },
opbnb: { symbol: "BNB", txType: 0 },
sei: { symbol: "SEI", txType: 0 },
ronin: { symbol: "RON", txType: 0 },
nebula: { symbol: "sFUEL", txType: 0 },
immutable: { symbol: "IMX", txType: 0 },
};

// Add the helper function
Expand Down Expand Up @@ -312,6 +337,11 @@ describe("getActiveChains", () => {
{ chain: "zkEVM", symbol: "ZKEVM" },
{ chain: "bevm", symbol: "BTC" },
{ chain: "rootstock", symbol: "RBTC" },
{ chain: "opbnb", symbol: "BNB" },
{ chain: "sei", symbol: "SEI" },
{ chain: "ronin", symbol: "RON" },
{ chain: "nebula", symbol: "sFUEL" },
{ chain: "immutable", symbol: "IMX" },
],
}).toMatchObject(result);
});
Expand Down
7 changes: 5 additions & 2 deletions src/lib/test/vault.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ let phrase = process.env.MNEMONIC;

let pin = process.env.PIN;
let vault = new Vault({});

const logs = [
{
action: "add-account",
Expand Down Expand Up @@ -67,7 +66,6 @@ const logs = [
_id: "64ec3339a58abcbf66a9b34a",
},
];

describe("getSupportedChains", () => {
test("getSupportedChains", async () => {
let result = await new Vault({}).getSupportedChains();
Expand All @@ -85,6 +83,11 @@ describe("getSupportedChains", () => {
zkEVM: "ZKEVM",
bevm: "BTC",
rootstock: "RBTC",
opbnb: "BNB",
sei: "SEI",
ronin: "RON",
nebula: "sFUEL",
immutable: "IMX",
},
nonEvmChains: { bitcoin: "BTC", stacks: "STX", solana: "SOL" },
}).toMatchObject(result.response);
Expand Down

0 comments on commit 408ff84

Please sign in to comment.