Skip to content

Commit 0483b10

Browse files
committed
fix build
1 parent e658295 commit 0483b10

File tree

7 files changed

+89
-8
lines changed

7 files changed

+89
-8
lines changed

dist/index.d.mts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React from 'react';
2+
import { WalletSelector, AccountState, VerifyOwnerParams, VerifiedOwner, WalletModuleFactory } from '@near-wallet-selector/core';
3+
export { Account, BrowserWallet, Wallet, WalletBehaviourFactory, WalletModule, WalletModuleFactory } from '@near-wallet-selector/core';
4+
import { WalletSelectorModal } from '@near-wallet-selector/modal-ui';
5+
6+
interface ContextProviderType {
7+
children: React.ReactNode;
8+
network?: 'testnet' | 'mainnet';
9+
onlyMbWallet?: boolean;
10+
contractAddress?: string;
11+
additionalWallets?: Array<WalletModuleFactory>;
12+
onlyBitteWallet?: boolean;
13+
walletUrl?: string;
14+
}
15+
type BitteWalletContext = {
16+
selector: WalletSelector;
17+
modal: WalletSelectorModal | undefined;
18+
accounts: AccountState[];
19+
activeAccountId: string | null;
20+
isConnected: boolean;
21+
isWaitingForConnection: boolean;
22+
isWalletSelectorSetup: boolean;
23+
errorMessage: string | null;
24+
connect: () => Promise<void>;
25+
disconnect: () => Promise<void>;
26+
signMessage: (params: VerifyOwnerParams) => Promise<VerifiedOwner>;
27+
};
28+
declare const BitteWalletContext: React.Context<BitteWalletContext | null>;
29+
declare const BitteWalletContextProvider: React.FC<ContextProviderType>;
30+
declare const useBitteWallet: () => BitteWalletContext;
31+
32+
type UseNearPriceReturn = {
33+
nearPrice: number;
34+
error: string | null;
35+
};
36+
declare const useNearPrice: () => UseNearPriceReturn;
37+
38+
export { BitteWalletContext, BitteWalletContextProvider, useBitteWallet, useNearPrice };

dist/index.d.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React from 'react';
2+
import { WalletSelector, AccountState, VerifyOwnerParams, VerifiedOwner, WalletModuleFactory } from '@near-wallet-selector/core';
3+
export { Account, BrowserWallet, Wallet, WalletBehaviourFactory, WalletModule, WalletModuleFactory } from '@near-wallet-selector/core';
4+
import { WalletSelectorModal } from '@near-wallet-selector/modal-ui';
5+
6+
interface ContextProviderType {
7+
children: React.ReactNode;
8+
network?: 'testnet' | 'mainnet';
9+
onlyMbWallet?: boolean;
10+
contractAddress?: string;
11+
additionalWallets?: Array<WalletModuleFactory>;
12+
onlyBitteWallet?: boolean;
13+
walletUrl?: string;
14+
}
15+
type BitteWalletContext = {
16+
selector: WalletSelector;
17+
modal: WalletSelectorModal | undefined;
18+
accounts: AccountState[];
19+
activeAccountId: string | null;
20+
isConnected: boolean;
21+
isWaitingForConnection: boolean;
22+
isWalletSelectorSetup: boolean;
23+
errorMessage: string | null;
24+
connect: () => Promise<void>;
25+
disconnect: () => Promise<void>;
26+
signMessage: (params: VerifyOwnerParams) => Promise<VerifiedOwner>;
27+
};
28+
declare const BitteWalletContext: React.Context<BitteWalletContext | null>;
29+
declare const BitteWalletContextProvider: React.FC<ContextProviderType>;
30+
declare const useBitteWallet: () => BitteWalletContext;
31+
32+
type UseNearPriceReturn = {
33+
nearPrice: number;
34+
error: string | null;
35+
};
36+
declare const useNearPrice: () => UseNearPriceReturn;
37+
38+
export { BitteWalletContext, BitteWalletContextProvider, useBitteWallet, useNearPrice };

dist/index.js

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.mjs

Lines changed: 5 additions & 0 deletions
Large diffs are not rendered by default.

dist/index.mjs.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/BitteWalletContext.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,10 @@ export type BitteWalletContext = {
3535

3636
interface ContextProviderType {
3737
children: React.ReactNode;
38-
callbackUrl?: string;
39-
network?: string;
38+
network?: 'testnet' | 'mainnet';
4039
onlyMbWallet?: boolean;
4140
contractAddress?: string;
4241
additionalWallets?: Array<WalletModuleFactory>;
43-
successUrl?: string;
44-
failureUrl?: string;
4542
onlyBitteWallet?: boolean;
4643
walletUrl?:string
4744
}
@@ -56,8 +53,6 @@ export const BitteWalletContextProvider: React.FC<ContextProviderType> = ({
5653
contractAddress,
5754
additionalWallets,
5855
onlyBitteWallet,
59-
callbackUrl,
60-
successUrl,
6156
walletUrl,
6257
}): JSX.Element => {
6358
const [errorMessage, setErrorMessage] = useState<string | null>(null);
@@ -91,9 +86,7 @@ export const BitteWalletContextProvider: React.FC<ContextProviderType> = ({
9186
return await setupBitteWalletSelector(
9287
isOnlyBitteWallet,
9388
selectedNetwork,
94-
selectedContract,
9589
{additionalWallets: additionalWallets },
96-
successUrl,
9790
walletUrl
9891
);
9992
};

0 commit comments

Comments
 (0)