Skip to content

Commit

Permalink
fix: dapp kit type exports and fix react connection certificate data
Browse files Browse the repository at this point in the history
  • Loading branch information
davidecarpini committed Feb 8, 2024
1 parent a174572 commit c224701
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions examples/sample-react-app/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ ReactDOM.createRoot(document.getElementById('root')!).render(
genesis={'test'}
usePersistence
walletConnectOptions={walletConnectOptions}
connectionCertificate={{
message: {
purpose: 'identification',
payload: {
type: 'text',
content: `Sign this message to confirm that you own this wallet: GINOOOOOO`,
},
},
}}
>
<App />
</DAppKitProvider>
Expand Down
3 changes: 3 additions & 0 deletions packages/dapp-kit-react/src/DAppKitProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const DAppKitProvider: React.FC<DAppKitProviderOptions> = ({
language,
modalParent,
onSourceClick,
connectionCertificate: connectionCertificateData,
}): React.ReactElement => {
const connex = useMemo(
() =>
Expand All @@ -47,6 +48,7 @@ export const DAppKitProvider: React.FC<DAppKitProviderOptions> = ({
language,
modalParent,
onSourceClick,
connectionCertificate: connectionCertificateData,
}),
[
nodeUrl,
Expand All @@ -61,6 +63,7 @@ export const DAppKitProvider: React.FC<DAppKitProviderOptions> = ({
language,
modalParent,
onSourceClick,
connectionCertificateData,
],
);

Expand Down
2 changes: 2 additions & 0 deletions packages/dapp-kit-react/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import type React from 'react';
import * as ThorDevkit from 'thor-devkit';
import type { ConnectResponse, WalletSource } from '@vechain/dapp-kit';
import { type DAppKitUIOptions } from '@vechain/dapp-kit-ui';
export type { WalletConnectOptions, DAppKitOptions } from '@vechain/dapp-kit';
export type { DAppKitUIOptions } from '@vechain/dapp-kit-ui';

export interface AccountState {
address: string | null;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"compilerOptions": {}
"extends": "@vechain/repo-config/src/tsconfig/base.json"
}

0 comments on commit c224701

Please sign in to comment.