-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add swie * feat: refactor sign siwe * feat: add sign btn text render * fix: add account status & signIn from provider * fix: console * feat: 添加 siwe provider * chore: update test * chore: add changeset * docs: update wagmi docs * fix: test * fix: remove siwe provider * chore: use wagmi base mock config * feat: opt * chore: update test * chore: merge main * fix: update test * chore: delete comment * chore: update render text
- Loading branch information
Showing
26 changed files
with
702 additions
and
241 deletions.
There are no files selected for viewing
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,7 @@ | ||
--- | ||
'@ant-design/web3-common': minor | ||
'@ant-design/web3-wagmi': minor | ||
'@ant-design/web3': minor | ||
--- | ||
|
||
feat: wagmi add siwe config |
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
28 changes: 28 additions & 0 deletions
28
packages/wagmi/src/wagmi-provider/__mocks__/wagmiBaseMock.ts
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,28 @@ | ||
import { mainnet } from 'wagmi/chains'; | ||
|
||
const mockConnector = { | ||
name: 'MetaMask', | ||
}; | ||
|
||
export const wagmiBaseMock = { | ||
useAccount: () => { | ||
return { | ||
chain: mainnet, | ||
address: '0x21CDf0974d53a6e96eF05d7B324a9803735fFd3B', | ||
connector: mockConnector, | ||
}; | ||
}, | ||
useConfig: () => ({}), | ||
useBalance: () => ({ data: {} }), | ||
useSwitchChain: () => ({ switchChain: () => {} }), | ||
useConnect: () => ({ | ||
connectors: [mockConnector], | ||
connectAsync: async () => ({}), | ||
}), | ||
useDisconnect: () => ({ | ||
disconnectAsync: () => {}, | ||
}), | ||
useEnsName: () => ({ data: null }), | ||
useEnsAvatar: () => ({ data: null }), | ||
useSignMessage: () => ({ signMessageAsync: async () => 'signMessage' }), | ||
}; |
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
Oops, something went wrong.