Skip to content

Commit

Permalink
feat: implement sdk core in certificate-wallet.ts and wallet-manager.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfopietro97 committed May 31, 2024
1 parent 76e32fd commit f60abec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/dapp-kit/src/classes/certificate-wallet.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -34,7 +34,7 @@ class CertificateBasedWallet implements ConnexWallet {
};

try {
ThorDevkit.Certificate.verify(connectionCertificate);
certificate.verify(connectionCertificate);

return {
account: signer,
Expand Down
6 changes: 3 additions & 3 deletions packages/dapp-kit/src/classes/wallet-manager.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
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,
DAppKitOptions,
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 {
Expand Down Expand Up @@ -89,7 +89,7 @@ class WalletManager {
};

try {
ThorDevkit.Certificate.verify(connectionCertificate);
certificate.verify(connectionCertificate);
this.state.address = signer;
this.state.connectionCertificate = connectionCertificate;
return {
Expand Down

0 comments on commit f60abec

Please sign in to comment.