Skip to content

Commit

Permalink
Merge pull request #1625 from sushiswap/aptos-fix-msafe
Browse files Browse the repository at this point in the history
fix(apps/aptos): fix msafe
  • Loading branch information
OlaStenberg authored Aug 21, 2024
2 parents cdf0d2e + 677fceb commit dd49c8d
Show file tree
Hide file tree
Showing 6 changed files with 419 additions and 47 deletions.
2 changes: 1 addition & 1 deletion apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@hookform/resolvers": "3.3.1",
"@layerzerolabs/scan-client": "0.0.6",
"@martianwallet/aptos-wallet-adapter": "^0.0.5",
"@msafe/aptos-wallet-adapter": "^1.0.14",
"@msafe/aptos-wallet-adapter": "^1.1.3",
"@next/bundle-analyzer": "^14.2.3",
"@octokit/auth-app": "4.0.7",
"@orbs-network/twap-ui-sushiswap": "1.1.40",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function ConnectButton(props: ButtonProps) {
const Icon = WalletIcons[wallet.name]
return (
<DropdownMenuItem
onClick={() => onSelect(wallet.name as WalletName)}
onClick={() => onSelect(wallet.name)}
key={wallet.name}
>
<Icon className="w-4 h-4 mr-2" />
Expand Down
5 changes: 1 addition & 4 deletions apps/web/src/app/(non-evm)/aptos/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { FewchaWallet } from 'fewcha-plugin-wallet-adapter'
import { PetraWallet } from 'petra-plugin-wallet-adapter'
import { Modal } from '~aptos/(common)/components/Modal/Modal'
import { chains } from '~aptos/(common)/config/chains'

const wallets = [
new PetraWallet(),
new PontemWallet(),
new FewchaWallet(),
new MartianWallet(),
new RiseWallet(),
new MSafeWalletAdapter(
Object.values(chains).map((chain) => chain.other.MSafeOrigin),
),
new MSafeWalletAdapter(),
]

export function Providers({ children }: { children: React.ReactNode }) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"patchedDependencies": {
"@rainbow-me/rainbowkit@2.1.3": "patches/@rainbow-me__rainbowkit@2.1.3.patch",
"@aptos-labs/aptos-client@0.1.0": "patches/@aptos-labs__aptos-client@0.1.0.patch",
"@msafe/aptos-wallet-adapter@1.0.14": "patches/@msafe__aptos-wallet-adapter@1.0.14.patch"
"@msafe/aptos-wallet-adapter@1.1.3": "patches/@msafe__aptos-wallet-adapter@1.1.3.patch"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
diff --git a/src/index.ts b/src/index.ts
index 35d2757a46df570e20dd0002f2bcff22dfa3fb5f..3e58a9142a7f230c583cacafbac92407a44a7f2a 100644
index ea19ab90c0a3add8447d6006d611ffb120f9662c..3da90e1647208afaef1b46f09f5e4f87349aebc3 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -56,10 +56,6 @@ export class MSafeWalletAdapter implements AdapterPlugin {
.catch((e) => {
@@ -60,9 +60,6 @@ export class MSafeWalletAdapter implements AdapterPlugin {
console.log("🚀 ~ file: index.ts:57 ~ MSafeWalletAdapter:", e);
});
- } else {
} else {
- console.log(
- "🚀 ~ file: index.ts:63 ~ MSafeWalletAdapter: not in msafe wallet:"
- );
}
}

url = "https://aptos.m-safe.io/";
Loading

0 comments on commit dd49c8d

Please sign in to comment.