Skip to content

Commit

Permalink
Merge branch 'master' into fix/torus
Browse files Browse the repository at this point in the history
  • Loading branch information
jordaaash committed Oct 22, 2021
2 parents 8827e32 + de489d9 commit a0da7e9
Show file tree
Hide file tree
Showing 16 changed files with 93 additions and 103 deletions.
62 changes: 31 additions & 31 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/core/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/wallet-adapter-react",
"version": "0.13.0",
"version": "0.13.1",
"author": "Solana Maintainers <[email protected]>",
"repository": "https://github.com/solana-labs/wallet-adapter",
"license": "Apache-2.0",
Expand Down
82 changes: 41 additions & 41 deletions packages/core/react/src/WalletProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const WalletProvider: FC<WalletProviderProps> = ({
children,
wallets,
autoConnect = false,
onError = (error: WalletError) => console.error(error),
onError: _onError = (error: WalletError) => console.error(error),
localStorageKey = 'walletName',
}) => {
const [name, setName] = useLocalStorage<WalletName | null>(localStorageKey, null);
Expand All @@ -44,6 +44,7 @@ export const WalletProvider: FC<WalletProviderProps> = ({
const [disconnecting, setDisconnecting] = useState(false);
const isConnecting = useRef(false);
const isDisconnecting = useRef(false);
const isUnloading = useRef(false);

// Map of wallet names to wallets
const walletsByName = useMemo(
Expand Down Expand Up @@ -87,6 +88,16 @@ export const WalletProvider: FC<WalletProviderProps> = ({
})();
}, [isConnecting, connecting, connected, autoConnect, adapter, ready, setConnecting, setName]);

// If the window is closing or reloading, ignore disconnect and error events from the adapter
useEffect(() => {
function listener() {
isUnloading.current = true;
}

window.addEventListener('beforeunload', listener);
return () => window.removeEventListener('beforeunload', listener);
}, [isUnloading]);

// Select a wallet by name
const select = useCallback(
async (newName: WalletName | null) => {
Expand Down Expand Up @@ -114,36 +125,45 @@ export const WalletProvider: FC<WalletProviderProps> = ({
}, [adapter, setState]);

// Handle the adapter's disconnect event
const onDisconnect = useCallback(() => setName(null), [setName]);
const onDisconnect = useCallback(() => {
// Clear the selected wallet unless the window is unloading
if (!isUnloading.current) setName(null);
}, [isUnloading, setName]);

// Handle the adapter's error event, and local errors
const onError = useCallback(
(error: WalletError) => {
// Call the provided error handler unless the window is unloading
if (!isUnloading.current) _onError(error);
return error;
},
[isUnloading, _onError]
);

// Connect the adapter to the wallet
const connect = useCallback(async () => {
if (isConnecting.current || connecting || disconnecting || connected) return;

if (!wallet || !adapter) {
const error = new WalletNotSelectedError();
onError(error);
throw error;
}
if (!wallet || !adapter) throw onError(new WalletNotSelectedError());

if (!ready) {
// Clear the selected wallet
setName(null);

if (typeof window !== 'undefined') {
window.open(wallet.url, '_blank');
}

const error = new WalletNotReadyError();
onError(error);
throw error;
throw onError(new WalletNotReadyError());
}

isConnecting.current = true;
setConnecting(true);
try {
await adapter.connect();
} catch (error: any) {
// Clear the selected wallet
setName(null);
// Rethrow the error, and onError will also be called
throw error;
} finally {
setConnecting(false);
Expand All @@ -160,8 +180,12 @@ export const WalletProvider: FC<WalletProviderProps> = ({
setDisconnecting(true);
try {
await adapter.disconnect();
} finally {
} catch (error: any) {
// Clear the selected wallet
setName(null);
// Rethrow the error, and onError will also be called
throw error;
} finally {
setDisconnecting(false);
isDisconnecting.current = false;
}
Expand All @@ -170,17 +194,8 @@ export const WalletProvider: FC<WalletProviderProps> = ({
// Send a transaction using the provided connection
const sendTransaction = useCallback(
async (transaction: Transaction, connection: Connection, options?: SendTransactionOptions) => {
if (!adapter) {
const error = new WalletNotSelectedError();
onError(error);
throw error;
}
if (!connected) {
const error = new WalletNotConnectedError();
onError(error);
throw error;
}

if (!adapter) throw onError(new WalletNotSelectedError());
if (!connected) throw onError(new WalletNotConnectedError());
return await adapter.sendTransaction(transaction, connection, options);
},
[adapter, onError, connected]
Expand All @@ -191,12 +206,7 @@ export const WalletProvider: FC<WalletProviderProps> = ({
() =>
adapter && 'signTransaction' in adapter
? async (transaction: Transaction): Promise<Transaction> => {
if (!connected) {
const error = new WalletNotConnectedError();
onError(error);
throw error;
}

if (!connected) throw onError(new WalletNotConnectedError());
return await adapter.signTransaction(transaction);
}
: undefined,
Expand All @@ -208,12 +218,7 @@ export const WalletProvider: FC<WalletProviderProps> = ({
() =>
adapter && 'signAllTransactions' in adapter
? async (transactions: Transaction[]): Promise<Transaction[]> => {
if (!connected) {
const error = new WalletNotConnectedError();
onError(error);
throw error;
}

if (!connected) throw onError(new WalletNotConnectedError());
return await adapter.signAllTransactions(transactions);
}
: undefined,
Expand All @@ -225,12 +230,7 @@ export const WalletProvider: FC<WalletProviderProps> = ({
() =>
adapter && 'signMessage' in adapter
? async (message: Uint8Array): Promise<Uint8Array> => {
if (!connected) {
const error = new WalletNotConnectedError();
onError(error);
throw error;
}

if (!connected) throw onError(new WalletNotConnectedError());
return await adapter.signMessage(message);
}
: undefined,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/react/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export * from './useAnchorWallet';
export * from './ConnectionProvider';
export * from './errors';
export * from './useAnchorWallet';
export * from './useConnection';
export * from './useLocalStorage';
export * from './useWallet';
Expand Down
6 changes: 0 additions & 6 deletions packages/core/react/src/useLocalStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ export function useLocalStorage<T>(key: string, defaultState: T): [T, (newValue:
if (newValue === value) return;
setValue(newValue);

if (newValue === null) {
localStorage.removeItem(key);
} else {
localStorage.setItem(key, JSON.stringify(newValue));
}

if (newValue === null) {
localStorage.removeItem(key);
} else {
Expand Down
3 changes: 2 additions & 1 deletion packages/core/wallets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@solana/wallet-adapter-wallets",
"version": "0.11.0",
"version": "0.11.1",
"author": "Solana Maintainers <[email protected]>",
"repository": "https://github.com/solana-labs/wallet-adapter",
"license": "Apache-2.0",
Expand All @@ -25,6 +25,7 @@
"@solana/wallet-adapter-base": "^0.7.0"
},
"dependencies": {
"@solana/wallet-adapter-bitkeep": "^0.1.0",
"@solana/wallet-adapter-bitpie": "^0.3.0",
"@solana/wallet-adapter-blocto": "^0.3.0",
"@solana/wallet-adapter-clover": "^0.2.0",
Expand Down
20 changes: 8 additions & 12 deletions packages/core/wallets/src/bitkeep.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// import { BitKeepWalletAdapter, BitKeepWalletAdapterConfig } from '@solana/wallet-adapter-bitkeep';
// import { Wallet, WalletName } from './types';
//
// @solana/wallet-adapter-bitkeep isn't published to NPM yet
//
// export const getBitKeepWallet = (config: BitKeepWalletAdapterConfig = {}): Wallet => ({
// name: WalletName.BitKeep,
// url: 'https://www.bitkeep.org',
// icon: 'data:image/png;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHdpZHRoPSIxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ5NWJmZiI+PHBhdGggZD0ibTYyLjI4NTcgODcuOTY0NC0zNi44MTI5LTIxLjI2MzhjLTEuMjkzMi0uNzQ3Ni0yLjA4ODktMi4xMjctMi4wODg5LTMuNjIwOXYtNDIuNTc5NGMwLS42NDQyLS42OTctMS4wNDY5LTEuMjU1LS43MjQybC03LjUzMjUgNC4zNTVjLTIuODQ1IDEuNjQ1NC00LjU5NjQgNC42ODEzLTQuNTk2NCA3Ljk2NjF2MzUuODA3OWMwIDMuMjg2IDEuNzUxNCA2LjMyMTkgNC41OTY0IDcuOTY2MWwzMC45NTA0IDE3Ljg5MjljMi44NDg4IDEuNjQ3OSA2LjM2MTMgMS42NDc5IDkuMjExMyAwbDcuNTI3Ni00LjM1MjVjLjU1NzktLjMyMDIuNTU3OS0xLjEyNDUgMC0xLjQ0NzJ6Ii8+PHBhdGggZD0ibTMyLjE1OTYgNjIuODE4NSAxNS44OTE1IDkuMTg3OWMxLjI5NTcuNzQ4OCAyLjg5MTkuN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MTg3NXYxMy4xMjQwOWMwIC4yOTkzLjE1ODkuNTc1MS40MTc2LjcyNDJsMjQuMjY4OSAxNC4wMjMxYzEuMjkzMi43NDc2IDIuMDg4OCAyLjEyNyAyLjA4ODggMy42MjF2MjYuMTU1OGMwIDEuNDkzOS0uNzk2OCAyLjg3MzMtMi4wODg4IDMuNjIwOWwtMTYuNzMxNSA5LjY3MzFjLS41NTY3LjMyMjctLjU1NjcgMS4xMjY5IDAgMS40NDg0bDExLjI4OSA2LjUxNzdjLjUxODUuMjk5MyAxLjE1NjUuMjk5MyAxLjY3MzggMGwxNC42NDUxLTguNDY2MWMyLjg0MzgtMS42NDQyIDQuNTk2NC00LjY4MDIgNC41OTY0LTcuOTY2MXYtMzUuODA5MmMwLTMuMjg1OS0xLjc1MTQtNi4zMjE5LTQuNTk2NC03Ljk2NjF6Ii8+PC9nPjwvc3ZnPg==',
// adapter: () => new BitKeepWalletAdapter(config),
// });
import { BitKeepWalletAdapter, BitKeepWalletAdapterConfig } from '@solana/wallet-adapter-bitkeep';
import { Wallet, WalletName } from './types';

export {}; // not published yet
export const getBitKeepWallet = (config: BitKeepWalletAdapterConfig = {}): Wallet => ({
name: WalletName.BitKeep,
url: 'https://bitkeep.com',
icon: 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHdpZHRoPSIxMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iIzQ5NWJmZiI+PHBhdGggZD0ibTYyLjI4NTcgODcuOTY0NC0zNi44MTI5LTIxLjI2MzhjLTEuMjkzMi0uNzQ3Ni0yLjA4ODktMi4xMjctMi4wODg5LTMuNjIwOXYtNDIuNTc5NGMwLS42NDQyLS42OTctMS4wNDY5LTEuMjU1LS43MjQybC03LjUzMjUgNC4zNTVjLTIuODQ1IDEuNjQ1NC00LjU5NjQgNC42ODEzLTQuNTk2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kzbC01LjgyOCAzLjM2ODVjLS45MTUxLjUyOTYtMi4wNDMzLjUyOTYtMi45NTg0IDBsLTUuODI4LTMuMzY4NWMtLjkxMzgtLjUyODMtMS40NzY3LTEuNTAzOC0xLjQ3NjctMi41NTkzeiIvPjxwYXRoIGQ9Im04NS43MDQ3IDI0LjEyLTMwLjk1MDUtMTcuODk0MDljLTEuMjk2OC0uNzUwMDUtMi43MzA0LTEuMTU3NzEtNC4xNzY0LTEuMjI1NDUtLjIzNzctLjAxMTA5LS40MzYuMTgxMDQtLjQzNi40MTg3NXYxMy4xMjQwOWMwIC4yOTkzLjE1ODkuNTc1MS40MTc2LjcyNDJsMjQuMjY4OSAxNC4wMjMxYzEuMjkzMi43NDc2IDIuMDg4OCAyLjEyNyAyLjA4ODggMy42MjF2MjYuMTU1OGMwIDEuNDkzOS0uNzk2OCAyLjg3MzMtMi4wODg4IDMuNjIwOWwtMTYuNzMxNSA5LjY3MzFjLS41NTY3LjMyMjctLjU1NjcgMS4xMjY5IDAgMS40NDg0bDExLjI4OSA2LjUxNzdjLjUxODUuMjk5MyAxLjE1NjUuMjk5MyAxLjY3MzggMGwxNC42NDUxLTguNDY2MWMyLjg0MzgtMS42NDQyIDQuNTk2NC00LjY4MDIgNC41OTY0LTcuOTY2MXYtMzUuODA5MmMwLTMuMjg1OS0xLjc1MTQtNi4zMjE5LTQuNTk2NC03Ljk2NjF6Ii8+PC9nPjwvc3ZnPg==',
adapter: () => new BitKeepWalletAdapter(config),
});
2 changes: 1 addition & 1 deletion packages/core/wallets/src/blocto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Wallet, WalletName } from './types';

export const getBloctoWallet = (config: BloctoWalletAdapterConfig = {}): Wallet => ({
name: WalletName.Blocto,
url: 'https://wallet.blocto.app',
url: 'https://blocto.app',
icon: 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIH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c0MS0uMzYwMDcgMy4zMDAzLjE1NDY2IDUuOTk3OCAyLjM0MTUxIDYuOTM2OSA1LjMyMDM3eiIgZmlsbD0iIzM0ODVjNCIvPjwvZz48L3N2Zz4=',
adapter: () => new BloctoWalletAdapter(config),
});
2 changes: 1 addition & 1 deletion packages/core/wallets/src/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Wallet, WalletName } from './types';

export const getLedgerWallet = (config: LedgerWalletAdapterConfig = {}): Wallet => ({
name: WalletName.Ledger,
url: 'https://www.ledger.com',
url: 'https://ledger.com',
icon: 'data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMzUgMzUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0iI2ZmZiI+PHBhdGggZD0ibTIzLjU4OCAwaC0xNnYyMS41ODNoMjEuNnYtMTZhNS41ODUgNS41ODUgMCAwIDAgLTUuNi01LjU4M3oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuNzM5KSIvPjxwYXRoIGQ9Im04LjM0MiAwaC0yLjc1N2E1LjU4NSA1LjU4NSAwIDAgMCAtNS41ODUgNS41ODV2Mi43NTdoOC4zNDJ6Ii8+PHBhdGggZD0ibTAgNy41OWg4LjM0MnY4LjM0MmgtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDUuNzM5KSIvPjxwYXRoIGQ9Im0xNS4xOCAyMy40NTFoMi43NTdhNS41ODUgNS41ODUgMCAwIDAgNS41ODUtNS42di0yLjY3MWgtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMS40NzggMTEuNDc4KSIvPjxwYXRoIGQ9Im03LjU5IDE1LjE4aDguMzQydjguMzQyaC04LjM0MnoiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDUuNzM5IDExLjQ3OCkiLz48cGF0aCBkPSJtMCAxNS4xOHYyLjc1N2E1LjU4NSA1LjU4NSAwIDAgMCA1LjU4NSA1LjU4NWgyLjc1N3YtOC4zNDJ6IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDExLjQ3OCkiLz48L2c+PC9zdmc+',
adapter: () => new LedgerWalletAdapter(config),
});
2 changes: 1 addition & 1 deletion packages/core/wallets/src/phantom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Wallet, WalletName } from './types';

export const getPhantomWallet = (config: PhantomWalletAdapterConfig = {}): Wallet => ({
name: WalletName.Phantom,
url: 'https://www.phantom.app',
url: 'https://phantom.app',
icon: 'data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjM0IiB3aWR0aD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4MT0iLjUiIHgyPSIuNSIgeTE9IjAiIHkyPSIxIj48c3RvcCBvZmZzZXQ9IjAiIHN0b3AtY29sb3I9IiM1MzRiYjEiLz48c3RvcCBvZmZzZXQ9IjEiIHN0b3AtY29sb3I9IiM1NTFiZjkiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9Ii41IiB4Mj0iLjUiIHkxPSIwIiB5Mj0iMSI+PHN0b3Agb2Zmc2V0PSIwIiBzdG9wLWNvbG9yPSIjZmZmIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjZmZmIiBzdG9wLW9wYWNpdHk9Ii44MiIvPjwvbGluZWFyR3JhZGllbnQ+PGNpcmNsZSBjeD0iMTciIGN5PSIxNyIgZmlsbD0idXJsKCNhKSIgcj0iMTciLz48cGF0aCBkPSJtMjkuMTcwMiAxNy4yMDcxaC0yLjk5NjljMC02LjEwNzQtNC45NjgzLTExLjA1ODE3LTExLjA5NzUtMTEuMDU4MTctNi4wNTMyNSAwLTEwLjk3NDYzIDQuODI5NTctMTEuMDk1MDggMTAuODMyMzctLjEyNDYxIDYuMjA1IDUuNzE3NTIgMTEuNTkzMiAxMS45NDUzOCAxMS41OTMyaC43ODM0YzUuNDkwNiAwIDEyLjg0OTctNC4yODI5IDEzLjk5OTUtOS41MDEzLjIxMjMtLjk2MTktLjU1MDItMS44NjYxLTEuNTM4OC0xLjg2NjF6bS0xOC41NDc5LjI3MjFjMCAuODE2Ny0uNjcwMzggMS40ODQ3LTEuNDkwMDEgMS40ODQ3LS44MTk2NCAwLTEuNDg5OTgtLjY2ODMtMS40ODk5OC0xLjQ4NDd2LTIuNDAxOWMwLS44MTY3LjY3MDM0LTEuNDg0NyAxLjQ4OTk4LTEuNDg0Ny44MTk2MyAwIDEuNDkwMDEuNjY4IDEuNDkwMDEgMS40ODQ3em01LjE3MzggMGMwIC44MTY3LS42NzAzIDEuNDg0Ny0xLjQ4OTkgMS40ODQ3LS44MTk3IDAtMS40OS0uNjY4My0xLjQ5LTEuNDg0N3YtMi40MDE5YzAtLjgxNjcuNjcwNi0xLjQ4NDcgMS40OS0xLjQ4NDcuODE5NiAwIDEuNDg5OS42NjggMS40ODk5IDEuNDg0N3oiIGZpbGw9InVybCgjYikiLz48L3N2Zz4K',
adapter: () => new PhantomWalletAdapter(config),
});
2 changes: 1 addition & 1 deletion packages/core/wallets/src/safepal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Wallet, WalletName } from './types';

export const getSafePalWallet = (config: SafePalWalletAdapterConfig = {}): Wallet => ({
name: WalletName.SafePal,
url: 'https://www.safepal.io',
url: 'https://safepal.io',
icon: 'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI1NiIgdmlld0JveD0iMCAwIDI1NiAyNTYiIHdpZHRoPSIyNTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMjU2IDEyOGMwIDcwLjY5Mzg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