@solana/wallet-adapter-clover
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -57,2 +57,3 @@ "use strict"; | ||
this._connecting = true; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const wallet = window.clover_solana; | ||
@@ -59,0 +60,0 @@ let account; |
@@ -5,13 +5,10 @@ import { BaseSignerWalletAdapter, scopePollingDetectionStrategy, WalletAccountError, WalletNotConnectedError, WalletNotReadyError, WalletPublicKeyError, WalletReadyState, WalletSignTransactionError, } from '@solana/wallet-adapter-base'; | ||
export class CloverWalletAdapter extends BaseSignerWalletAdapter { | ||
name = CloverWalletName; | ||
url = 'https://clover.finance'; | ||
icon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzQiIGhlaWdodD0iNzQiIHZpZXdCb3g9IjAgMCA3NCA3NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTczLjg5NDcgMTguNTc4OEM3My44OTQ3IDI4Ljc4MTUgNjUuNjIzOCAzNy4wNTI1IDU1LjQyMTEgMzcuMDUyNUM0NS4yNTczIDM3LjA1MjUgMzcuMDEwNiAyOC44NDQ2IDM2Ljk0NzcgMTguNjk1NkMzNi44ODUzIDI4LjgxMyAyOC42ODk5IDM3LjAwMTUgMTguNTY5OSAzNy4wNTI3QzI4LjcyODQgMzcuMTA0NSAzNi45NDc0IDQ1LjM1NTUgMzYuOTQ3NCA1NS41MjYyQzM2Ljk0NzQgNjUuNzI4OSAyOC42NzY0IDczLjk5OTggMTguNDczNyA3My45OTk4QzguMjcwOTUgNzMuOTk5OCAwIDY1LjcyODkgMCA1NS41MjYyQzAgNDUuMzU1MyA4LjIxOTM5IDM3LjEwNDEgMTguMzc4MiAzNy4wNTI3QzguMjE5NzIgMzcuMDAwOSAwLjAwMDcxOTU3MiAyOC43NDk5IDAuMDAwNzE5NTcyIDE4LjU3OTNDMC4wMDA3MTk1NzIgOC4zNzY1NCA4LjI3MTY3IDAuMTA1NTkxIDE4LjQ3NDQgMC4xMDU1OTFDMjguNjM4MiAwLjEwNTU5MSAzNi44ODQ5IDguMzEzNDggMzYuOTQ3NyAxOC40NjI1QzM3LjAxMDMgOC4zMTMyNiA0NS4yNTcxIDAuMTA1MTAzIDU1LjQyMTEgMC4xMDUxMDNDNjUuNjIzOCAwLjEwNTEwMyA3My44OTQ3IDguMzc2MDUgNzMuODk0NyAxOC41Nzg4Wk01NS40MjExIDM3LjA1MjVDNDUuMjE4MyAzNy4wNTI1IDM2Ljk0NzQgNDUuMzIzNCAzNi45NDc0IDU1LjUyNjJDMzYuOTQ3NCA2NS43Mjg5IDQ1LjIxODMgNzMuOTk5OCA1NS40MjExIDczLjk5OThDNjUuNjIzOCA3My45OTk4IDczLjg5NDcgNjUuNzI4OSA3My44OTQ3IDU1LjUyNjJDNzMuODk0NyA0NS4zMjM0IDY1LjYyMzggMzcuMDUyNSA1NS40MjExIDM3LjA1MjVaIiBmaWxsPSIjMjdBNTc3Ii8+PC9zdmc+Cg=='; | ||
_connecting; | ||
_wallet; | ||
_publicKey; | ||
_readyState = typeof window === 'undefined' || typeof document === 'undefined' | ||
? WalletReadyState.Unsupported | ||
: WalletReadyState.NotDetected; | ||
constructor(config = {}) { | ||
super(); | ||
this.name = CloverWalletName; | ||
this.url = 'https://clover.finance'; | ||
this.icon = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzQiIGhlaWdodD0iNzQiIHZpZXdCb3g9IjAgMCA3NCA3NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTczLjg5NDcgMTguNTc4OEM3My44OTQ3IDI4Ljc4MTUgNjUuNjIzOCAzNy4w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of window === 'undefined' || typeof document === 'undefined' | ||
? WalletReadyState.Unsupported | ||
: WalletReadyState.NotDetected; | ||
this._connecting = false; | ||
@@ -22,3 +19,4 @@ this._wallet = null; | ||
scopePollingDetectionStrategy(() => { | ||
if (window.clover_solana?.isCloverWallet) { | ||
var _a; | ||
if ((_a = window.clover_solana) === null || _a === void 0 ? void 0 : _a.isCloverWallet) { | ||
this._readyState = WalletReadyState.Installed; | ||
@@ -48,2 +46,3 @@ this.emit('readyStateChange', this._readyState); | ||
this._connecting = true; | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const wallet = window.clover_solana; | ||
@@ -55,3 +54,3 @@ let account; | ||
catch (error) { | ||
throw new WalletAccountError(error?.message, error); | ||
throw new WalletAccountError(error === null || error === void 0 ? void 0 : error.message, error); | ||
} | ||
@@ -63,3 +62,3 @@ let publicKey; | ||
catch (error) { | ||
throw new WalletPublicKeyError(error?.message, error); | ||
throw new WalletPublicKeyError(error === null || error === void 0 ? void 0 : error.message, error); | ||
} | ||
@@ -94,3 +93,3 @@ this._wallet = wallet; | ||
catch (error) { | ||
throw new WalletSignTransactionError(error?.message, error); | ||
throw new WalletSignTransactionError(error === null || error === void 0 ? void 0 : error.message, error); | ||
} | ||
@@ -112,3 +111,3 @@ } | ||
catch (error) { | ||
throw new WalletSignTransactionError(error?.message, error); | ||
throw new WalletSignTransactionError(error === null || error === void 0 ? void 0 : error.message, error); | ||
} | ||
@@ -115,0 +114,0 @@ } |
{ | ||
"name": "@solana/wallet-adapter-clover", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"author": "Solana Maintainers <maintainers@solana.foundation>", | ||
@@ -30,6 +30,6 @@ "repository": "https://github.com/solana-labs/wallet-adapter", | ||
"dependencies": { | ||
"@solana/wallet-adapter-base": "^0.9.0", | ||
"@solana/wallet-adapter-base": "^0.9.1", | ||
"@solana/web3.js": "^1.20.0" | ||
}, | ||
"gitHead": "d26322bf91216583bcb983dab677f000c2c2d941" | ||
"gitHead": "dddfd864a629873f5de255a4bccb3533a29317fa" | ||
} |
@@ -82,2 +82,3 @@ import { | ||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion | ||
const wallet = window!.clover_solana!; | ||
@@ -84,0 +85,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
39930
450
0