Skip to content

Commit 6605830

Browse files
authored
Merge pull request #4 from MobileWalletProtocol/felix/connector
wagmi-connectors
2 parents 87d4adf + 162d4fa commit 6605830

18 files changed

Lines changed: 9639 additions & 5660 deletions
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
*.md
33

44
# folders to ignore
5-
build
6-
dist
7-
node_modules
8-
verdor-js
5+
**/dist
6+
**/node_modules

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-4.4.0.cjs
-81.8 KB
Binary file not shown.

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"repository": "https://github.com/MobileWalletProtocol/react-native-client.git",
3+
"author": "Coinbase, Inc.",
4+
"license": "Apache-2.0",
5+
"private": true,
6+
"workspaces": [
7+
"packages/*"
8+
],
9+
"packageManager": "yarn@4.4.0"
10+
}

packages/client/jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ export default {
5757
},
5858

5959
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
60-
testPathIgnorePatterns: ['/node_modules/', '/build/'],
60+
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
6161
};

packages/client/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
"main": "dist/index.js",
1616
"types": "dist/index.d.ts",
1717
"sideEffects": false,
18-
"repository": "https://github.com/MobileWalletProtocol/react-native-client",
18+
"repository": {
19+
"type": "git",
20+
"url": "https://github.com/MobileWalletProtocol/react-native-client.git",
21+
"directory": "packages/client"
22+
},
1923
"author": "Coinbase, Inc.",
2024
"license": "Apache-2.0",
2125
"scripts": {
@@ -77,4 +81,4 @@
7781
"tslib": "^2.6.0",
7882
"typescript": "^5.1.6"
7983
}
80-
}
84+
}

packages/client/src/MWPClient.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ export class MWPClient {
8585
}
8686

8787
async handshake(): Promise<AddressString[]> {
88+
if (this.accounts.length > 0) return this.accounts;
89+
8890
const handshakeMessage = await this.createRequestMessage({
8991
handshake: {
9092
method: 'eth_requestAccounts',

packages/client/src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import { MWPClient } from './MWPClient';
33
export default MWPClient;
44

55
export { handleResponse } from './components/communicator';
6-
export type { AppMetadata, Preference, ProviderInterface } from './core/provider/interface';
6+
export type { AppMetadata, ProviderInterface } from './core/provider/interface';
7+
export type { Wallet } from './core/wallet';
8+
export { Wallets } from './core/wallet';
79
export { EIP1193Provider } from './interfaces/eip1193/EIP1193Provider';
810
export { MWPClient } from './MWPClient';

packages/client/tsconfig.base.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"**/*.test.*",
55
],
66
"exclude": [
7+
"node_modules",
78
"dist",
89
],
910
"compilerOptions": {

0 commit comments

Comments
 (0)