diff --git a/extension/src/manifest.json b/extension/src/manifest.json index 05e7ae10..fd6a8aaa 100644 --- a/extension/src/manifest.json +++ b/extension/src/manifest.json @@ -1,7 +1,7 @@ { "name": "Sollet", "description": "Solana SPL Token Wallet", - "version": "0.3.0", + "version": "0.3.1", "browser_action": { "default_popup": "index.html", "default_title": "Open the popup" @@ -14,14 +14,20 @@ }, "background": { "persistent": true, - "scripts": ["background.js"] + "scripts": [ + "background.js" + ] }, "permissions": [ "storage" ], "content_scripts": [ { - "matches": ["file://*/*", "http://*/*", "https://*/*"], + "matches": [ + "file://*/*", + "http://*/*", + "https://*/*" + ], "js": [ "contentscript.js" ], @@ -29,7 +35,8 @@ "all_frames": true } ], - "web_accessible_resources": ["script.js"], + "web_accessible_resources": [ + "script.js" + ], "content_security_policy": "script-src 'self' 'sha256-ek+jXksbUr00x+EdLLqiv69t8hATh5rPjHVvVVGA9ms='; object-src 'self'" -} - \ No newline at end of file +} \ No newline at end of file diff --git a/src/components/NavigationFrame.js b/src/components/NavigationFrame.js index 51a8820c..0b1dd55b 100644 --- a/src/components/NavigationFrame.js +++ b/src/components/NavigationFrame.js @@ -70,21 +70,23 @@ export default function NavigationFrame({ children }) { return ( <> -
- - Beware of sites attempting to impersonate sollet.io or other DeFi - services. - -
+ {!isExtension && ( +
+ + Beware of sites attempting to impersonate sollet.io or other DeFi + services. + +
+ )} {isExtensionWidth ? 'Sollet' : 'Solana SPL Token Wallet'} diff --git a/src/components/SwapButton.js b/src/components/SwapButton.js index bad3a91a..6203bd20 100644 --- a/src/components/SwapButton.js +++ b/src/components/SwapButton.js @@ -10,7 +10,6 @@ import SwapHoriz from '@material-ui/icons/SwapHoriz'; import PopupState, { bindTrigger, bindPopover } from 'material-ui-popup-state'; import Swap from '@project-serum/swap-ui'; import { Provider } from '@project-serum/anchor'; -import { Connection, TransactionSignature } from '@solana/web3.js'; import { TokenListContainer } from '@solana/spl-token-registry'; import { useTokenInfos } from '../utils/tokens/names'; import { useSendTransaction } from '../utils/notifications'; @@ -22,9 +21,9 @@ import DialogForm from './DialogForm'; export default function SwapButton({ size }) { const isExtensionWidth = useIsExtensionWidth(); if (isExtensionWidth) { - return ; + return ; } else { - return ; + return ; } } @@ -119,9 +118,9 @@ function SwapButtonPopover({ size }) { class NotifyingProvider extends Provider { constructor( - connection: Connection, - wallet: Wallet, - sendTransaction: (Promise, Function) => void, + connection, + wallet, + sendTransaction, ) { super(connection, wallet, { commitment: 'recent', @@ -130,10 +129,10 @@ class NotifyingProvider extends Provider { } async send( - tx: Transaction, - signers?: Array, - opts?: ConfirmOptions, - ): Promise { + tx, + signers, + opts, + ) { return new Promise((onSuccess, onError) => { this.sendTransaction(super.send(tx, signers, opts), { onSuccess, @@ -143,11 +142,11 @@ class NotifyingProvider extends Provider { } async sendAll( - txs: Array<{ tx: Transaction, signers: Array }>, - opts?: ConfirmOptions, - ): Promise> { + txs, + opts, + ) { return new Promise(async (resolve, onError) => { - let txSigs: Array = []; + let txSigs = []; for (const tx of txs) { txSigs.push( await new Promise((onSuccess) => { diff --git a/src/utils/transactions.ts b/src/utils/transactions.ts index 916ac9e3..9e4e1fce 100644 --- a/src/utils/transactions.ts +++ b/src/utils/transactions.ts @@ -117,6 +117,7 @@ const toInstruction = async ( ); } else if (programId.equals(RAYDIUM_STAKE_PROGRAM_ID)) { console.log('[' + index + '] Handled as raydium stake instruction'); + // @ts-ignore const decodedInstruction = decodeStakeInstruction(decoded); return await handleRayStakeInstruction( connection, @@ -126,6 +127,7 @@ const toInstruction = async ( ); } else if (programId.equals(RAYDIUM_LP_PROGRAM_ID)) { console.log('[' + index + '] Handled as raydium lp instruction'); + // @ts-ignore const decodedInstruction = decodeLpInstruction(decoded); return await handleRayLpInstruction( connection, @@ -135,6 +137,7 @@ const toInstruction = async ( ); } else if (programId.equals(MANGO_PROGRAM_ID) || programId.equals(MANGO_PROGRAM_ID_V2)) { console.log('[' + index + '] Handled as mango markets instruction'); + // @ts-ignore let decodedInstruction = decodeMangoInstruction(decoded); return await handleMangoInstruction( connection,