-
Notifications
You must be signed in to change notification settings - Fork 449
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app): switching to web3modal (#2669)
* feat(app): switching to web3modal - WIP * working except for buffer injection issue * fixed buffer issue, minor UX improvements * feat(app): fixed alignment/spacing of dashboard top components * fix(app): use default dashboard if customization key is removed from URL * tweaks * fix(tests): test fixes * fix(app): reload when connected address changes
- Loading branch information
1 parent
eff5971
commit 7dc0c42
Showing
32 changed files
with
908 additions
and
1,846 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
var address = "0xfF7edbD01e9d044486781ff52c42EA7a01612644"; | ||
var switchNetwork = jest.fn(); | ||
var openModal = jest.fn(); | ||
|
||
module.exports = { | ||
mockAddress: address, | ||
switchNetworkMock: switchNetwork, | ||
openModalMock: openModal, | ||
useDisconnect: () => ({ | ||
disconnect: jest.fn(), | ||
}), | ||
useSwitchNetwork: () => ({ | ||
switchNetwork: switchNetwork, | ||
}), | ||
defaultConfig: jest.fn(), | ||
createWeb3Modal: jest.fn(), | ||
useWeb3ModalError: () => ({ | ||
error: undefined, | ||
}), | ||
useWeb3ModalProvider: () => ({ | ||
provider: jest.fn(), | ||
}), | ||
useWeb3ModalState: () => ({ | ||
open: false, | ||
}), | ||
useWeb3Modal: () => ({ | ||
open: openModal, | ||
}), | ||
useWeb3ModalEvents: () => ({ | ||
data: { | ||
event: "MODAL_CLOSE", | ||
properties: { | ||
connected: true, | ||
}, | ||
}, | ||
}), | ||
useWeb3ModalAccount: () => ({ | ||
isConnected: true, | ||
address: address, | ||
chain: 10, | ||
}), | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.