Skip to content

Commit

Permalink
docs: Update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wenty22 authored Dec 1, 2023
1 parent 2d103a4 commit b285443
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ Before adding a new wallet, you need to collect some information:

| item | description | e.g. | required |
| ------------------ | --------------------------------------------------------------------------------------------------- | ----------------------------------- | -------- |
| wallet name | - | Trust Wallet | yes |
| wallet name | - | Trust Wallet | ✔️ |
| short name | If display space is insufficient, the short name will be displayed. | Trust | optional |
| wallet logo | logo in svg format. | - | yes |
| download url | - | https://trustwallet.com/download | yes |
| deeplink | After clicking deeplink in the system browser, we can directly open dapp in the app's dapp browser. | trust://open_url?coin_id=60&url=xxx | yes |
| wallet logo | logo in svg format. | - | ✔️ |
| download url | - | https://trustwallet.com/download | ✔️ |
| deeplink | After clicking deeplink in the system browser, we can directly open dapp in the app's dapp browser. | trust://open_url?coin_id=60&url=xxx | ✔️ |
| WalletConnect link | If your app supports WalletConnect, please provides the WalletConnect uri. | trust://wc?uri=xxx | optional |

Then you can add it to project by following steps:
Expand Down Expand Up @@ -117,7 +117,7 @@ export function trustWallet(props: TrustWalletProps = {}): WalletProps {
default: 'https://trustwallet.com/',
},
spinnerColor: '#1098FC',
installed: isTrustWallet(),
isInstalled: isTrustWallet,
createConnector: (chains: Chain[]) => {
return new TrustWalletConnector({
chains,
Expand Down Expand Up @@ -163,7 +163,7 @@ export interface WalletProps {
};
spinnerColor?: string;
showQRCode?: boolean;
installed: boolean | undefined;
isInstalled: () => boolean | undefined;
createConnector: (chains: Chain[]) => Connector;
getDeepLink: () => string | undefined;
getQRCodeUri?: (uri: string) => string;
Expand Down Expand Up @@ -205,6 +205,30 @@ const config = createConfig(
);
```
## Notice!!! Test cases for adding a new wallet
Before merging the PR to main branch, we hope you complete the following tests, and fill the test results into the PR template, otherwise the PR may
not be approved.
In general, wallet is available at several different platforms, such as PC browser extension,
Android, iOS and WalletConnect. If your wallet supports the corresponding platform, please make sure
your wallet is worked, can it be connected, can it switch networks, and can it support testnet?
|test case|steps|support?|connected?|switch networks?|support testnet?|
|-|-|-|-|-|-|
|PC, browser extension|<ol><li>Open dapp in PC browser</li><li>Select your wallet, check the functions</li><ol>|✔️|✔️|✔️|✔️|
|Android, in system browser|<ol><li>Open dapp in Android system browser, select your wallet</li><li>The wallet app will be evoked, and the dapp will be open in the wallet dapp browser</li><li>Select your wallet, check the functions</li></ol>|✔️|✔️|❌|✔️|
|Android, in wallet dapp browser|<ol><li>Open dapp in the wallet dapp browser</li><li>Select your wallet, check the functions</li><ol>|✔️|✔️|✔️|✔️|
|iOS, in system browser|<ol><li>Open dapp in iOS system browser, select your wallet</li><li>The wallet app will be evoked, and the dapp will be open in the wallet dapp browser</li><li>Select your wallet, check the functions</li></ol>|✔️|✔️|✔️|❌|
|iOS, in wallet dapp browser|<ol><li>Open dapp in the wallet dapp browser </li><li>Select your wallet, check the functions</li></ol>|✔️|✔️|✔️|❌|
|WalletConnect, PC|<ol><li>Scan the QR code of WalletConnect using your wallet app</li><li>You will see a popup on the wallet app that asks you to connect WalletConnect</li><li>Check the functions</li></ol>|✔️|✔️|✔️|✔️|
|WalletConnect, Android, in system browser|<ol><li>Open dapp in Android system browser, select WalletConnect, choose your wallet in WalletConnect wallet list</li><li>The wallet app will be evoked, a popup for applying to connect WalletConnect will be displayed. </li><li>Check the functions</li></ol>|✔️|✔️|✔️|✔️|
|WalletConnect, Android, in wallet dapp browser|<ol><li>Open dapp in the wallet dapp browser</li><li>Select WalletConnect, choose your wallet in WalletConnect wallet list</li><li>A popup for applying to connect WalletConnect will be displayed</li><li>Check the functions</li><ol>|✔️|✔️|✔️|✔️|
|WalletConnect, iOS, in system browser|<ol><li>Open dapp in iOS system browser, select WalletConnect, choose your wallet in WalletConnect wallet list</li><li>The wallet app will be evoked, a popup for applying to connect WalletConnect will be displayed. </li><li>Check the functions</li></ol>|✔️|✔️|✔️|✔️|
|WalletConnect, iOS, in wallet dapp browser|<ol><li>Open dapp in the wallet dapp browser</li><li>Select WalletConnect, choose your wallet in WalletConnect wallet list</li><li>A popup for applying to connect WalletConnect will be displayed</li><li>Check the functions</li><ol>|✔️|✔️|✔️|✔️|
## Release notes
A complete development workflow like following:
Expand Down

0 comments on commit b285443

Please sign in to comment.