From d89194d84ee3b9dc2cc2c03d79628ff2f8e970f3 Mon Sep 17 00:00:00 2001 From: Andraz <69682837+andyv09@users.noreply.github.com> Date: Tue, 24 Jan 2023 09:57:33 +0100 Subject: [PATCH] fix: fixes provider bug (#100) * fix: provider bug * fix: add ethereum param * fix: some fixes and remove comments * fix: fix tests * fix: tests Co-authored-by: martines3000 --- packages/snap/index.html | 130 +++++++--- packages/snap/snap.manifest.json | 2 +- packages/snap/src/did/key/keyDidResolver.ts | 16 +- packages/snap/src/did/pkh/pkhDidUtils.ts | 6 +- packages/snap/src/index.ts | 10 +- packages/snap/src/interfaces.ts | 4 +- packages/snap/src/rpc/did/getDID.ts | 4 +- packages/snap/src/rpc/did/switchMethod.ts | 10 +- packages/snap/src/rpc/snap/configure.ts | 1 - packages/snap/src/rpc/vc/deleteVC.ts | 3 +- packages/snap/src/rpc/vc/queryVCs.ts | 3 +- packages/snap/src/rpc/vc/saveVC.ts | 10 +- packages/snap/src/utils/ceramicUtils.ts | 12 +- packages/snap/src/utils/didUtils.ts | 12 +- packages/snap/src/utils/init.ts | 2 +- packages/snap/src/utils/keyPair.ts | 2 +- packages/snap/src/utils/snapUtils.ts | 13 +- packages/snap/src/utils/stateUtils.ts | 4 +- packages/snap/src/utils/veramoUtils.ts | 33 +-- .../ceramicDataStore/ceramicDataStore.ts | 18 +- .../plugins/snapDataStore/snapDataStore.ts | 34 ++- packages/snap/src/veramo/setup.ts | 38 +-- .../snap/tests/did/keyDidResolver.spec.ts | 1 + packages/snap/tests/rpc/onRpcRequest.spec.ts | 17 +- packages/snap/tests/testUtils/constants.ts | 10 +- packages/snap/tests/testUtils/snap.mock.ts | 25 +- .../snap/tests/utils/ceramicUtils.spec.ts | 30 ++- packages/snap/tests/utils/didUtils.spec.ts | 29 ++- packages/snap/tests/utils/snapUtils.spec.ts | 17 +- packages/snap/tests/utils/stateUtils.spec.ts | 3 + packages/snap/tests/utils/veramoUtils.spec.ts | 232 ++++++++++++++++-- 31 files changed, 549 insertions(+), 182 deletions(-) diff --git a/packages/snap/index.html b/packages/snap/index.html index fda25b63f..534c61f0f 100644 --- a/packages/snap/index.html +++ b/packages/snap/index.html @@ -66,6 +66,7 @@

Hello, Snaps!


+

@@ -77,38 +78,105 @@

Hello, Snaps!

type="text/javascript" >