From 6aa5d2e9cafa9dd11aa00bfd7c67b1266303b3d8 Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:46:55 -0700 Subject: [PATCH 1/3] =?UTF-8?q?devop:=20=F0=9F=94=A7=20release=20prerp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/extension/package.json | 2 +- packages/extension/src/libs/dapp-list/index.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/extension/package.json b/packages/extension/package.json index ad5f1b48c..6c3029dc9 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -1,6 +1,6 @@ { "name": "@enkryptcom/extension", - "version": "1.35.0", + "version": "1.36.0", "private": true, "scripts": { "zip": "cd dist; zip -r release.zip *;", diff --git a/packages/extension/src/libs/dapp-list/index.ts b/packages/extension/src/libs/dapp-list/index.ts index ad1dbeb8a..050838e4f 100644 --- a/packages/extension/src/libs/dapp-list/index.ts +++ b/packages/extension/src/libs/dapp-list/index.ts @@ -65,6 +65,8 @@ const lists: Partial> = { "https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/celo.json", [NetworkNames.MaticZK]: "https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/matic-zkevm.json", + [NetworkNames.Bitcoin]: + "https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/dapps/btc.json", }; export default lists; From ee6bd5aaaeca89c75fe233e6a93f050d01413a38 Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:27:06 -0700 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=F0=9F=90=9B=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/swap/tests/changelly.test.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/swap/tests/changelly.test.ts b/packages/swap/tests/changelly.test.ts index 7eb063e38..387ce6401 100644 --- a/packages/swap/tests/changelly.test.ts +++ b/packages/swap/tests/changelly.test.ts @@ -39,9 +39,7 @@ describe("Changelly Provider", () => { expect(quote?.quote.meta.walletIdentifier).to.be.eq( WalletIdentifier.enkrypt ); - expect(quote?.fromTokenAmount.toString()).to.be.eq( - quote?.minMax.minimumFrom.toString() - ); + expect(quote?.fromTokenAmount.toString()).to.be.eq(amount.toString()); expect(quote?.toTokenAmount.gtn(0)).to.be.eq(true); const swap = await changelly.getSwap(quote!.quote); From cd935de74310ae6176fcb76f65f65facec0be1e9 Mon Sep 17 00:00:00 2001 From: kvhnuke <10602065+kvhnuke@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:03:09 -0700 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=F0=9F=90=9B=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/name-resolution/src/ens/index.ts | 7 +++++- packages/name-resolution/src/sid/index.ts | 23 +++++++++++++++---- .../name-resolution/tests/resolver.test.ts | 2 +- packages/name-resolution/tests/sid.test.ts | 4 ++-- 4 files changed, 27 insertions(+), 9 deletions(-) diff --git a/packages/name-resolution/src/ens/index.ts b/packages/name-resolution/src/ens/index.ts index 78e0b567f..9962275aa 100644 --- a/packages/name-resolution/src/ens/index.ts +++ b/packages/name-resolution/src/ens/index.ts @@ -17,7 +17,12 @@ class ENSResolver implements BaseResolver { } public async init(): Promise { - this.ENSProvider = new ethers.providers.JsonRpcProvider(this.options.node); + this.ENSProvider = new ethers.providers.JsonRpcProvider({ + url: this.options.node, + headers: { + "user-agent": "enkrypt/name-resolver", + }, + }); } public async resolveReverseName(address: string): Promise { diff --git a/packages/name-resolution/src/sid/index.ts b/packages/name-resolution/src/sid/index.ts index bbaf7de2c..ca465372e 100644 --- a/packages/name-resolution/src/sid/index.ts +++ b/packages/name-resolution/src/sid/index.ts @@ -20,14 +20,24 @@ class SIDResolver implements BaseResolver { public async init(): Promise {} public async resolveReverseName(address: string): Promise { - const bnbProvider = new ethers.providers.JsonRpcProvider(this.rpc.node.bnb); + const bnbProvider = new ethers.providers.JsonRpcProvider({ + url: this.rpc.node.bnb, + headers: { + "user-agent": "enkrypt/name-resolver", + }, + }); const sidBNB = new SID({ provider: bnbProvider, sidAddress: getSidAddress("56"), }); const nameBnb = await sidBNB.getName(address); if (nameBnb) return nameBnb.name; - const arbProvider = new ethers.providers.JsonRpcProvider(this.rpc.node.arb); + const arbProvider = new ethers.providers.JsonRpcProvider({ + url: this.rpc.node.arb, + headers: { + "user-agent": "enkrypt/name-resolver", + }, + }); const sidArb = new SID({ provider: arbProvider, sidAddress: getSidAddress("42161"), @@ -38,9 +48,12 @@ class SIDResolver implements BaseResolver { } public async resolveAddress(name: string): Promise { - const provider = new ethers.providers.JsonRpcProvider( - this.rpc.node[getTLD(name)] - ); + const provider = new ethers.providers.JsonRpcProvider({ + url: this.rpc.node[getTLD(name)], + headers: { + "user-agent": "enkrypt/name-resolver", + }, + }); const sid = new SID({ provider, sidAddress: getSidAddress(getTLD(name) === "bnb" ? "56" : "42161"), diff --git a/packages/name-resolution/tests/resolver.test.ts b/packages/name-resolution/tests/resolver.test.ts index 160ef093c..971992857 100644 --- a/packages/name-resolution/tests/resolver.test.ts +++ b/packages/name-resolution/tests/resolver.test.ts @@ -43,5 +43,5 @@ describe("Name Resolver resolving", () => { "0xb5932a6b7d50a966aec6c74c97385412fb497540" ); expect(name).to.be.eq("spaceid.eth"); - }).timeout(10000); + }).timeout(20000); }); diff --git a/packages/name-resolution/tests/sid.test.ts b/packages/name-resolution/tests/sid.test.ts index 35f1571f5..5f7604253 100644 --- a/packages/name-resolution/tests/sid.test.ts +++ b/packages/name-resolution/tests/sid.test.ts @@ -11,7 +11,7 @@ describe("SID Name resolving", () => { }, }); await resolver.init(); - const address = await resolver.resolveAddress("spaceid.arb", "ARB1"); + const address = await resolver.resolveAddress("spaceid.arb"); expect(address).to.be.eq("0xb5932a6B7d50A966AEC6C74C97385412Fb497540"); }).timeout(10000); @@ -41,7 +41,7 @@ describe("SID Name resolving", () => { "0xe5dc07bdcdb8c98850050c7f67de7e164b1ea392" ); expect(name).to.be.eq(null); - const address = await resolver.resolveAddress("sdfsfsdfsdfsdf.bnb", "BNB"); + const address = await resolver.resolveAddress("sdfsfsdfsdfsdf.bnb"); expect(address).to.be.eq(null); }).timeout(10000); });