Skip to content

Commit

Permalink
chore: updates to walletkit
Browse files Browse the repository at this point in the history
  • Loading branch information
ganchoradkov committed Nov 16, 2024
1 parent 37ae8af commit 3e8dfcf
Show file tree
Hide file tree
Showing 14 changed files with 162 additions and 800 deletions.
9 changes: 2 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,12 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.organizeImports": false
"source.organizeImports": "never"
},
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.wordWrapColumn": 90,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"files.exclude": {
"**/.rollup.cache": true,
"**/.git": true,
Expand Down
2 changes: 1 addition & 1 deletion examples/wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dependencies": {
"@json-rpc-tools/utils": "1.7.6",
"@nextui-org/react": "1.0.0-beta.12",
"@walletconnect/se-sdk": "1.10.0-rc.0",
"@walletconnect/se-sdk": "1.11.0-rc-1",
"ethers": "5.7.2",
"framer-motion": "9.0.2",
"next": "12.2.0",
Expand Down
2 changes: 0 additions & 2 deletions examples/wallet/src/components/Modal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import ModalStore from "@/store/ModalStore";
import AuthRequestModal from "@/views/AuthRequestModal";
import SessionProposalModal from "@/views/SessionProposalModal";
import SessionSendTransactionModal from "@/views/SessionSendTransactionModal";
import SessionRequestModal from "@/views/SessionSignModal";
Expand All @@ -20,7 +19,6 @@ export default function Modal() {
{view === "SessionSendTransactionModal" && <SessionSendTransactionModal />}
{view === "SessionUnsuportedMethodModal" && <SessionUnsuportedMethodModal />}
{view === "SwitchChainModal" && <SwitchChainModal />}
{view === "AuthRequestModal" && <AuthRequestModal />}
</NextModal>
);
}
9 changes: 0 additions & 9 deletions examples/wallet/src/hooks/useWalletConnectEventsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ export default function useWalletConnectEventsManager() {
[],
);

const onAuthRequest = useCallback(
(request: SingleEthereumTypes.EventArguments["auth_request"]) => {
ModalStore.open("AuthRequestModal", { authRequest: request });
},
[],
);

/******************************************************************************
* Set up WalletConnect event listeners
*****************************************************************************/
Expand All @@ -87,7 +80,6 @@ export default function useWalletConnectEventsManager() {
web3wallet.on("session_delete", (data: any) => {
console.log("delete", data);
});
web3wallet.on("auth_request", onAuthRequest);
}

return () => {
Expand All @@ -97,7 +89,6 @@ export default function useWalletConnectEventsManager() {
web3wallet.off("session_delete", (data: any) => {
console.log("delete", data);
});
web3wallet.off("auth_request", onAuthRequest);
}
};
}, [web3WalletReady, onSessionProposal, onSessionRequest]);
Expand Down
1 change: 0 additions & 1 deletion examples/wallet/src/store/ModalStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ interface ModalData {
proposal?: SingleEthereumTypes.EventArguments["session_proposal"];
requestEvent?: SingleEthereumTypes.EventArguments["session_request"];
requestSession?: SessionTypes.Struct;
authRequest?: SingleEthereumTypes.AuthRequest;
}
interface State {
open: boolean;
Expand Down
84 changes: 0 additions & 84 deletions examples/wallet/src/views/AuthRequestModal.tsx

This file was deleted.

Loading

0 comments on commit 3e8dfcf

Please sign in to comment.