From f60abecc21b698abba3fc9994eeed68b5c2164d2 Mon Sep 17 00:00:00 2001 From: rodolfopietro97 Date: Fri, 31 May 2024 16:41:52 +0200 Subject: [PATCH] feat: implement sdk core in certificate-wallet.ts and wallet-manager.ts --- packages/dapp-kit/src/classes/certificate-wallet.ts | 4 ++-- packages/dapp-kit/src/classes/wallet-manager.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/dapp-kit/src/classes/certificate-wallet.ts b/packages/dapp-kit/src/classes/certificate-wallet.ts index 79eaa2d0..787e0ed6 100644 --- a/packages/dapp-kit/src/classes/certificate-wallet.ts +++ b/packages/dapp-kit/src/classes/certificate-wallet.ts @@ -1,4 +1,4 @@ -import * as ThorDevkit from 'thor-devkit'; +import { certificate } from '@vechain/sdk-core'; import type { BaseWallet, ConnectResponse, ConnexWallet } from '../types'; import { DEFAULT_CONNECT_CERT_MESSAGE } from '../constants'; @@ -34,7 +34,7 @@ class CertificateBasedWallet implements ConnexWallet { }; try { - ThorDevkit.Certificate.verify(connectionCertificate); + certificate.verify(connectionCertificate); return { account: signer, diff --git a/packages/dapp-kit/src/classes/wallet-manager.ts b/packages/dapp-kit/src/classes/wallet-manager.ts index c7a38d98..3173d727 100644 --- a/packages/dapp-kit/src/classes/wallet-manager.ts +++ b/packages/dapp-kit/src/classes/wallet-manager.ts @@ -1,6 +1,6 @@ -import * as ThorDevkit from 'thor-devkit'; import { proxy, subscribe } from 'valtio/vanilla'; import { subscribeKey } from 'valtio/vanilla/utils'; +import { certificate } from '@vechain/sdk-core'; import type { ConnectResponse, ConnexWallet, @@ -8,7 +8,7 @@ import type { WalletManagerState, WalletSource, } from '../types'; -import { DAppKitLogger, Storage, createWallet } from '../utils'; +import { createWallet, DAppKitLogger, Storage } from '../utils'; import { DEFAULT_CONNECT_CERT_MESSAGE, WalletSources } from '../constants'; class WalletManager { @@ -89,7 +89,7 @@ class WalletManager { }; try { - ThorDevkit.Certificate.verify(connectionCertificate); + certificate.verify(connectionCertificate); this.state.address = signer; this.state.connectionCertificate = connectionCertificate; return {