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

Dev -> test Integrated the following chains to safle-vault opBNB, Ronin, Sei Skale - Nebula, Immutable zk-EVM #366

Merged
merged 5 commits into from
Dec 10, 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
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
Loading