Skip to content

Commit

Permalink
chore(address-validator): implement in the monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
mroz22 committed Jul 11, 2024
1 parent 77a90ae commit 4297a0f
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 37 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ module.exports = {
'**/public/*',
'packages/suite-data/files/*',
'packages/protobuf/scripts/protobuf-patches/*',
'packages/address-validator',
'packages/connect-examples',
'ci/',
],
Expand Down
2 changes: 1 addition & 1 deletion packages/suite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"@suite-common/wallet-core": "workspace:*",
"@suite-common/wallet-types": "workspace:*",
"@suite-common/wallet-utils": "workspace:*",
"@trezor/address-validator": "workspace:*",
"@trezor/analytics": "workspace:*",
"@trezor/blockchain-link": "workspace:*",
"@trezor/blockchain-link-types": "workspace:*",
Expand Down Expand Up @@ -112,7 +113,6 @@
"redux-thunk": "^2.4.2",
"semver": "^7.6.0",
"styled-components": "^6.1.8",
"trezor-address-validator": "^0.4.4",
"uuid": "^9.0.1",
"web3-utils": "^4.2.3",
"zxcvbn": "^4.4.2"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import styled from 'styled-components';
import { useForm } from 'react-hook-form';
import addressValidator from 'trezor-address-validator';
import addressValidator from '@trezor/address-validator';

import { QuestionTooltip, Translation } from 'src/components/suite';
import { Input, variables, Button } from '@trezor/components';
Expand Down
1 change: 1 addition & 0 deletions packages/suite/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
{
"path": "../../suite-common/wallet-utils"
},
{ "path": "../address-validator" },
{ "path": "../analytics" },
{ "path": "../blockchain-link" },
{ "path": "../blockchain-link-types" },
Expand Down
2 changes: 1 addition & 1 deletion suite-common/wallet-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@suite-common/wallet-config": "workspace:*",
"@suite-common/wallet-constants": "workspace:*",
"@suite-common/wallet-types": "workspace:*",
"@trezor/address-validator": "workspace:*",
"@trezor/blockchain-link": "workspace:*",
"@trezor/blockchain-link-types": "workspace:*",
"@trezor/blockchain-link-utils": "workspace:*",
Expand All @@ -36,7 +37,6 @@
"date-fns": "^2.30.0",
"react": "18.2.0",
"react-hook-form": "^7.50.1",
"trezor-address-validator": "^0.4.4",
"web3-utils": "^4.2.3"
}
}
3 changes: 1 addition & 2 deletions suite-common/wallet-utils/src/validationUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import addressValidator from 'trezor-address-validator';

import addressValidator from '@trezor/address-validator';
import { getTestnetSymbols } from '@suite-common/wallet-config';
import { Account } from '@suite-common/wallet-types';

Expand Down
3 changes: 3 additions & 0 deletions suite-common/wallet-utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
{ "path": "../wallet-config" },
{ "path": "../wallet-constants" },
{ "path": "../wallet-types" },
{
"path": "../../packages/address-validator"
},
{
"path": "../../packages/blockchain-link"
},
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
{ "path": "suite-native/toasts" },
{ "path": "suite-native/transactions" },
{ "path": "suite-native/video-assets" },
{ "path": "packages/address-validator" },
{ "path": "packages/analytics" },
{ "path": "packages/auth-server" },
{ "path": "packages/blockchain-link" },
Expand Down
65 changes: 33 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4430,7 +4430,7 @@ __metadata:
languageName: node
linkType: hard

"@jest/environment@npm:^29.6.2, @jest/environment@npm:^29.7.0":
"@jest/environment@npm:^29.7.0":
version: 29.7.0
resolution: "@jest/environment@npm:29.7.0"
dependencies:
Expand Down Expand Up @@ -4461,7 +4461,7 @@ __metadata:
languageName: node
linkType: hard

"@jest/fake-timers@npm:^29.6.2, @jest/fake-timers@npm:^29.7.0":
"@jest/fake-timers@npm:^29.7.0":
version: 29.7.0
resolution: "@jest/fake-timers@npm:29.7.0"
dependencies:
Expand Down Expand Up @@ -4604,7 +4604,7 @@ __metadata:
languageName: node
linkType: hard

"@jest/types@npm:^29.6.1, @jest/types@npm:^29.6.3":
"@jest/types@npm:^29.6.3":
version: 29.6.3
resolution: "@jest/types@npm:29.6.3"
dependencies:
Expand Down Expand Up @@ -8922,6 +8922,7 @@ __metadata:
"@suite-common/wallet-config": "workspace:*"
"@suite-common/wallet-constants": "workspace:*"
"@suite-common/wallet-types": "workspace:*"
"@trezor/address-validator": "workspace:*"
"@trezor/blockchain-link": "workspace:*"
"@trezor/blockchain-link-types": "workspace:*"
"@trezor/blockchain-link-utils": "workspace:*"
Expand All @@ -8932,7 +8933,6 @@ __metadata:
date-fns: "npm:^2.30.0"
react: "npm:18.2.0"
react-hook-form: "npm:^7.50.1"
trezor-address-validator: "npm:^0.4.4"
web3-utils: "npm:^4.2.3"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -10392,6 +10392,23 @@ __metadata:
languageName: node
linkType: hard

"@trezor/address-validator@workspace:*, @trezor/address-validator@workspace:packages/address-validator":
version: 0.0.0-use.local
resolution: "@trezor/address-validator@workspace:packages/address-validator"
dependencies:
base-x: "npm:^3.0.7"
bech32: "npm:^2.0.0"
browserify-bignum: "npm:^1.3.0-2"
cbor-js: "npm:^0.1.0"
crc: "npm:^3.8.0"
groestl-hash-js: "npm:1.0.0"
jest-environment-jsdom: "npm:29.7.0"
jssha: "npm:2.3.1"
lodash: "npm:^4.17.15"
rimraf: "npm:^5.0.5"
languageName: unknown
linkType: soft

"@trezor/analytics@workspace:*, @trezor/analytics@workspace:packages/analytics":
version: 0.0.0-use.local
resolution: "@trezor/analytics@workspace:packages/analytics"
Expand Down Expand Up @@ -11320,6 +11337,7 @@ __metadata:
"@suite-common/wallet-utils": "workspace:*"
"@testing-library/react": "npm:14.2.1"
"@testing-library/user-event": "npm:14.5.2"
"@trezor/address-validator": "workspace:*"
"@trezor/analytics": "workspace:*"
"@trezor/blockchain-link": "workspace:*"
"@trezor/blockchain-link-types": "workspace:*"
Expand Down Expand Up @@ -11401,7 +11419,6 @@ __metadata:
styled-components: "npm:^6.1.8"
stylelint: "npm:^16.2.1"
stylelint-config-standard: "npm:^36.0.0"
trezor-address-validator: "npm:^0.4.4"
typescript-styled-plugin: "npm:^0.18.3"
uuid: "npm:^9.0.1"
web3-utils: "npm:^4.2.3"
Expand Down Expand Up @@ -25993,24 +26010,24 @@ __metadata:
languageName: node
linkType: hard

"jest-environment-jsdom@npm:^29.2.1":
version: 29.6.2
resolution: "jest-environment-jsdom@npm:29.6.2"
"jest-environment-jsdom@npm:29.7.0, jest-environment-jsdom@npm:^29.2.1":
version: 29.7.0
resolution: "jest-environment-jsdom@npm:29.7.0"
dependencies:
"@jest/environment": "npm:^29.6.2"
"@jest/fake-timers": "npm:^29.6.2"
"@jest/types": "npm:^29.6.1"
"@jest/environment": "npm:^29.7.0"
"@jest/fake-timers": "npm:^29.7.0"
"@jest/types": "npm:^29.6.3"
"@types/jsdom": "npm:^20.0.0"
"@types/node": "npm:*"
jest-mock: "npm:^29.6.2"
jest-util: "npm:^29.6.2"
jest-mock: "npm:^29.7.0"
jest-util: "npm:^29.7.0"
jsdom: "npm:^20.0.0"
peerDependencies:
canvas: ^2.5.0
peerDependenciesMeta:
canvas:
optional: true
checksum: 10/e6c7929919b0784cd2feb70714e2338bd900824d85a9eb6c333e2a94b468e0d19c147abde1ce1b99dcc1b969fbe679d6ea69f4385a30830f06ed98b16a7a621b
checksum: 10/23bbfc9bca914baef4b654f7983175a4d49b0f515a5094ebcb8f819f28ec186f53c0ba06af1855eac04bab1457f4ea79dae05f70052cf899863e8096daa6e0f5
languageName: node
linkType: hard

Expand Down Expand Up @@ -26138,7 +26155,7 @@ __metadata:
languageName: node
linkType: hard

"jest-mock@npm:^29.6.2, jest-mock@npm:^29.7.0":
"jest-mock@npm:^29.7.0":
version: 29.7.0
resolution: "jest-mock@npm:29.7.0"
dependencies:
Expand Down Expand Up @@ -26282,7 +26299,7 @@ __metadata:
languageName: node
linkType: hard

"jest-util@npm:^29.0.0, jest-util@npm:^29.6.2, jest-util@npm:^29.7.0":
"jest-util@npm:^29.0.0, jest-util@npm:^29.7.0":
version: 29.7.0
resolution: "jest-util@npm:29.7.0"
dependencies:
Expand Down Expand Up @@ -39093,22 +39110,6 @@ __metadata:
languageName: node
linkType: hard

"trezor-address-validator@npm:^0.4.4":
version: 0.4.4
resolution: "trezor-address-validator@npm:0.4.4"
dependencies:
base-x: "npm:^3.0.7"
bech32: "npm:^2.0.0"
browserify-bignum: "npm:^1.3.0-2"
cbor-js: "npm:^0.1.0"
crc: "npm:^3.8.0"
groestl-hash-js: "npm:1.0.0"
jssha: "npm:2.3.1"
lodash: "npm:^4.17.15"
checksum: 10/8f30bf4e2136cae746988b4761f07684b80250e82caeadcefdeaabb9e4e7bef9d3baaba48424a294870cc95735519b8feb5169ded87dec0a38cae2641b6f5edd
languageName: node
linkType: hard

"trezor-suite@workspace:.":
version: 0.0.0-use.local
resolution: "trezor-suite@workspace:."
Expand Down

0 comments on commit 4297a0f

Please sign in to comment.