Skip to content

Commit

Permalink
feat: add mobile provider
Browse files Browse the repository at this point in the history
  • Loading branch information
andybin-cdc committed May 23, 2022
1 parent 2305e90 commit 389ef34
Show file tree
Hide file tree
Showing 11 changed files with 27,033 additions and 67 deletions.
20 changes: 20 additions & 0 deletions lerna-debug.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
0 silly argv {
0 silly argv _: [ 'bootstrap' ],
0 silly argv hoist: true,
0 silly argv lernaVersion: '4.0.0',
0 silly argv '$0': '/Users/andy.bincrypto.com/Documents/Github/monacohq/deficonnect-monorepo/node_modules/.bin/lerna'
0 silly argv }
1 notice cli v4.0.0
2 verbose rootPath /Users/andy.bincrypto.com/Documents/Github/monacohq/deficonnect-monorepo
3 error JSONError: Unexpected token "}" (0x7D) in JSON at position 1470 while parsing near "...adata\": \"^1.0.0\",\n }\n}\n" in packages/mobile-provider/package.json
3 error
3 error   47 | "@deficonnect/utils": "^2.0.0-dev.0",
3 error   48 | "@walletconnect/window-metadata": "^1.0.0",
3 error > 49 | }
3 error   | ^
3 error   50 | }
3 error   51 |
3 error
3 error at parseJson (/Users/andy.bincrypto.com/Documents/Github/monacohq/deficonnect-monorepo/node_modules/load-json-file/node_modules/parse-json/index.js:29:21)
3 error at parse (/Users/andy.bincrypto.com/Documents/Github/monacohq/deficonnect-monorepo/node_modules/load-json-file/index.js:15:9)
3 error at module.exports (/Users/andy.bincrypto.com/Documents/Github/monacohq/deficonnect-monorepo/node_modules/load-json-file/index.js:18:47)
65 changes: 33 additions & 32 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,21 @@
"license": "Apache-2.0",
"scripts": {
"ls": "lerna ls",
"bootstrap": "npm install && run-s bootstrap:monorepo bootstrap:example",
"bootstrap": "npm install && run-s bootstrap:monorepo",
"bootstrap:monorepo": "lerna bootstrap --hoist",
"bootstrap:example": "cd example && npm install",
"build": "lerna run build",
"test": "lerna run test",
"lint": "eslint -c './.eslintrc' --fix 'packages/*/*/**/*.ts'",
"clean": "rm -rf dist && lerna run clean",
"clean:node_modules": "lerna exec -- rm -rf node_modules",
"clean:example": "cd example && rm -rf node_modules",
"clean:all": "run-s clean clean:node_modules clean:example",
"clean:all": "run-s clean clean:node_modules",
"new-version": "lerna version --no-git-tag-version --force-publish",
"npm-publish:latest": "lerna exec -- npm publish --access public",
"npm-publish:local": "lerna exec -- npm publish --access public --registry http://localhost:4873/",
"npm-publish:next": "lerna exec -- npm publish --access public --tag next",
"check:skip-test": "run-s clean lint build",
"check": "run-s clean lint build test",
"reset": "run-s clean:all bootstrap check",
"start": "cd example && npm run start",
"example": "run-s check:skip-test start",
"pre-publish": "run-s new-version reset",
"publish:latest": "run-s pre-publish npm-publish:latest",
Expand Down
32 changes: 15 additions & 17 deletions packages/connector-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/connector-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"dependencies": {
"@deficonnect/types": "^2.0.0-dev.0",
"@deficonnect/utils": "^2.0.0-dev.0",
"@walletconnect/iso-crypto": "^1.7.8"
"@walletconnect/iso-crypto": "^1.7.8",
"@walletconnect/window-metadata": "^1.0.0"
}
}
3 changes: 2 additions & 1 deletion packages/connector-client/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from '@deficonnect/utils'
import Emitter from 'events'
import { WebSocketClient } from './websocket-client'
import { getWindowMetadata } from '@walletconnect/window-metadata'

export const DEFI_CONNECT_URL = 'wss://wallet-connect.crypto.com/api/v2/ncwconnect/relay/ws'
export const DEFI_CONNECT_PROTOCOL = 'dc'
Expand Down Expand Up @@ -119,7 +120,7 @@ export class ConnectorClient extends Emitter {
bridge: DEFI_CONNECT_URL,
key,
clientId,
clientMeta: null,
clientMeta: getWindowMetadata(),
peerId: handshakeTopic,
peerMeta: null,
handshakeId,
Expand Down
Loading

0 comments on commit 389ef34

Please sign in to comment.