Skip to content

Commit

Permalink
Auto detect amino/direct signer for Keplr (#8)
Browse files Browse the repository at this point in the history
* fix delegate form validation

* set rarimo client stable version

* upd vscode project settings

* exclude extensions from gitignore, remove unused project settings
  • Loading branch information
lukachi authored Mar 27, 2024
1 parent 0697fe0 commit c91332a
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 54 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ yarn-error.log*
# editor directories and files
.vscode/*
!.vscode/settings.json
!.vscode/extensions.json
.idea
*.suo
*.ntvs*
Expand Down
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
8 changes: 6 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
"eslint.workingDirectories": [
{
"mode": "auto"
}
]
}
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog], and this project adheres to [Semantic Versioning].

## [1.3.0] - 2024-03-27
### Changed
- `@rarimo/client` to support amino signer

## [1.2.1] - 2024-03-20
### Fixed
- `tx` caller `where` filter
Expand Down Expand Up @@ -91,7 +95,8 @@ The format is based on [Keep a Changelog], and this project adheres to [Semantic

- Initiated project

[Unreleased]: https://gitlab.com/rarimo/scan/compare/1.2.1...HEAD
[Unreleased]: https://gitlab.com/rarimo/scan/compare/1.3.0...HEAD
[1.3.0]: https://gitlab.com/rarimo/scan/compare/1.2.1...1.3.0
[1.2.1]: https://gitlab.com/rarimo/scan/compare/1.2.0...1.2.1
[1.2.0]: https://gitlab.com/rarimo/scan/compare/1.1.4...1.2.0
[1.1.4]: https://gitlab.com/rarimo/scan/compare/1.1.3...1.1.4
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scan",
"version": "1.2.1",
"version": "1.3.0",
"private": true,
"gitHooks": {
"pre-commit": "yarn lint",
Expand All @@ -27,7 +27,7 @@
"@hookform/resolvers": "^3.3.1",
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.3",
"@rarimo/client": "^2.3.0",
"@rarimo/client": "^2.4.0",
"graphql": "^16.7.1",
"graphql-tag": "^2.12.6",
"lodash-es": "^4.17.21",
Expand Down
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { makeRarimoClient } from '@rarimo/client'
import { makeRarimoClient, type RarimoClient } from '@rarimo/client'

import { CONFIG } from '@/config'

Expand Down Expand Up @@ -29,6 +29,6 @@ const serverClient = makeRarimoClient({
apiUrl: CONFIG.IS_DEV_EDITION ? CONFIG.CHAIN_API_DOCKER_URL : CONFIG.CHAIN_API_URL,
})

export const getClient = () => {
export const getClient = (): RarimoClient => {
return typeof window === 'undefined' ? serverClient : client
}
4 changes: 3 additions & 1 deletion src/components/Forms/DelegateForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ export default function DelegateForm({
)

return isDelegation
? schema.minNumber(BN.fromBigInt(String(minDelegationAmount), CONFIG.DECIMALS).value)
? schema.minNumber(
BN.fromBigInt(String(minDelegationAmount || 0), CONFIG.DECIMALS).value,
)
: schema.maxNumber(
BN.fromBigInt(
delegation?.delegation_response.balance.amount ?? '0',
Expand Down
92 changes: 46 additions & 46 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ __metadata:
linkType: hard

"@apollo/client@npm:^3.7.17":
version: 3.9.8
resolution: "@apollo/client@npm:3.9.8"
version: 3.9.9
resolution: "@apollo/client@npm:3.9.9"
dependencies:
"@graphql-typed-document-node/core": ^3.1.1
"@wry/caches": ^1.0.0
Expand Down Expand Up @@ -55,7 +55,7 @@ __metadata:
optional: true
subscriptions-transport-ws:
optional: true
checksum: 9532fbbdeb6a5a1b6c92e7253017e7c15b1b24aac0c192a7801e5fd40caf2a73e1e9086668acdb0b700b044375d75e1e0aabd4b0aaff92168945bd0b57cf0953
checksum: 77c12baba06206c749d354f94b88f952b453b6797c9b5727c576cddba082f5a23eba94805c3f14a865ef1780970c15834489bb93c0e0bfc0546a2cf1e16b998a
languageName: node
linkType: hard

Expand Down Expand Up @@ -1718,8 +1718,8 @@ __metadata:
linkType: hard

"@graphql-tools/executor@npm:^1.2.1":
version: 1.2.3
resolution: "@graphql-tools/executor@npm:1.2.3"
version: 1.2.4
resolution: "@graphql-tools/executor@npm:1.2.4"
dependencies:
"@graphql-tools/utils": ^10.1.1
"@graphql-typed-document-node/core": 3.2.0
Expand All @@ -1728,7 +1728,7 @@ __metadata:
value-or-promise: ^1.0.12
peerDependencies:
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0
checksum: c4568e987fd7becda76357144bb91c5aeeec1cbc2861a4d724934b4f35f8faaebbf519c29b8ac608237d0558f3194e3358e4505e3cfaaf4b201ad3488b71db02
checksum: 9f27532cf5e799476e4db9d7422e4da97c5cf57e483e004b0e1276962eeb521052a4060aa3608498531313bbec281291b8a3dde5e2a07ed295ac2dc8c4816e66
languageName: node
linkType: hard

Expand Down Expand Up @@ -2557,27 +2557,27 @@ __metadata:
languageName: node
linkType: hard

"@rarimo/client@npm:^2.3.0":
version: 2.3.0
resolution: "@rarimo/client@npm:2.3.0"
"@rarimo/client@npm:^2.4.0":
version: 2.4.0
resolution: "@rarimo/client@npm:2.4.0"
dependencies:
"@cosmjs/launchpad": ^0.27.1
"@cosmjs/proto-signing": ^0.32.2
"@cosmjs/stargate": ^0.32.2
"@distributedlab/fetcher": ^1.0.0-rc.13
"@distributedlab/reactivity": ^1.0.0-rc.13
"@rarimo/shared": ^2.3.0
checksum: e515304024ba5608edba288d68747d3ea540090f3f69b583470ca0b62f101900aa78229baf168bf0f273aeb10b2c1d44d507995f7eb900cb30acfe994353bbf7
"@rarimo/shared": ^2.4.0
checksum: 2569daa72eeaf1988ac0aec8181ac4d48bfebe1f1b30cec290f396648407185c97ed578bb7f617015883ce6238eb0f0684a59d03b780076d236515182f95ae16
languageName: node
linkType: hard

"@rarimo/shared@npm:^2.3.0":
version: 2.3.0
resolution: "@rarimo/shared@npm:2.3.0"
"@rarimo/shared@npm:^2.4.0":
version: 2.4.0
resolution: "@rarimo/shared@npm:2.4.0"
dependencies:
"@distributedlab/jac": ^1.0.0-rc.13
"@distributedlab/tools": ^1.0.0-rc.13
checksum: 6eb853839801823a9be1ec0128a903048358436cced6f23e89a6a9d4947981ba09e707e462c4f188ab286f0248b0fbdf218ff3c3a361ee48e5bb7ad9f437f039
checksum: aa9f1d66a505396fc5f74a88d9f2b0e37166d1c5ff28dd3ba635d89139b143201da1db5b674c725e8c6a9a982fd797a05b22336ef325efbe8462a9726d5d1bd6
languageName: node
linkType: hard

Expand Down Expand Up @@ -2709,9 +2709,9 @@ __metadata:
linkType: hard

"@types/prop-types@npm:*, @types/prop-types@npm:^15.7.11":
version: 15.7.11
resolution: "@types/prop-types@npm:15.7.11"
checksum: 7519ff11d06fbf6b275029fe03fff9ec377b4cb6e864cac34d87d7146c7f5a7560fd164bdc1d2dbe00b60c43713631251af1fd3d34d46c69cd354602bc0c7c54
version: 15.7.12
resolution: "@types/prop-types@npm:15.7.12"
checksum: ac16cc3d0a84431ffa5cfdf89579ad1e2269549f32ce0c769321fdd078f84db4fbe1b461ed5a1a496caf09e637c0e367d600c541435716a55b1d9713f5035dfe
languageName: node
linkType: hard

Expand All @@ -2734,13 +2734,12 @@ __metadata:
linkType: hard

"@types/react@npm:*":
version: 18.2.67
resolution: "@types/react@npm:18.2.67"
version: 18.2.72
resolution: "@types/react@npm:18.2.72"
dependencies:
"@types/prop-types": "*"
"@types/scheduler": "*"
csstype: ^3.0.2
checksum: 9e48122b0e8d0ae20601f613aca32289eeb94d55c58ff03a7dc532d80ed289a1ba9715f14b773bd926ccdd63e503717f14264143ef531dc370063abe09dee0b2
checksum: 694127e704afd3fe1fefe699c6600d1edbb5a81c9862960f40f3d53d4ea625333199671b25b7f13191bc7fa088e15a4342a3de7fa8a5657a24744b65d6ec95f9
languageName: node
linkType: hard

Expand All @@ -2756,9 +2755,9 @@ __metadata:
linkType: hard

"@types/scheduler@npm:*":
version: 0.16.8
resolution: "@types/scheduler@npm:0.16.8"
checksum: 6c091b096daa490093bf30dd7947cd28e5b2cd612ec93448432b33f724b162587fed9309a0acc104d97b69b1d49a0f3fc755a62282054d62975d53d7fd13472d
version: 0.23.0
resolution: "@types/scheduler@npm:0.23.0"
checksum: 874d753aa65c17760dfc460a91e6df24009bde37bfd427a031577b30262f7770c1b8f71a21366c7dbc76111967384cf4090a31d65315155180ef14bd7acccb32
languageName: node
linkType: hard

Expand Down Expand Up @@ -4622,9 +4621,9 @@ __metadata:
linkType: hard

"electron-to-chromium@npm:^1.2.7, electron-to-chromium@npm:^1.4.668":
version: 1.4.715
resolution: "electron-to-chromium@npm:1.4.715"
checksum: b3ccbd571ecaa3b74b2c098b705416e15e36f9338f75fea062ba48397ac379972f915c29437286914d05ea9d3454b0fa74e9606becd6c221879c6fc139a09284
version: 1.4.717
resolution: "electron-to-chromium@npm:1.4.717"
checksum: 6fe08272b79342170e02699a5d1ba495b0287b906743ca03dca4d4c930ee09fd9b12302c6447bc98ca96973d3aa684e1d930bfaf120774e172c892089138a61e
languageName: node
linkType: hard

Expand Down Expand Up @@ -7515,11 +7514,11 @@ __metadata:
linkType: hard

"markdown-to-jsx@npm:^7.4.4":
version: 7.4.4
resolution: "markdown-to-jsx@npm:7.4.4"
version: 7.4.5
resolution: "markdown-to-jsx@npm:7.4.5"
peerDependencies:
react: ">= 0.14.0"
checksum: a901e68a4cf258095133b659a52b35dc7b8025706d74cb363831c664cf0c948d06098b6327dd956f0f429e31d8c7f2a272a39d16c9b370072d1012557f2ade41
checksum: 185f7a383ed8b46f015a98e1e6e9d57d5b82fea0fafb141f57b9362366a673989ade20f02711b96678a6e1d04cc3ca76b4689ffbd47623844b78dff9a57b9148
languageName: node
linkType: hard

Expand Down Expand Up @@ -8005,8 +8004,8 @@ __metadata:
linkType: hard

"node-gyp@npm:latest":
version: 10.0.1
resolution: "node-gyp@npm:10.0.1"
version: 10.1.0
resolution: "node-gyp@npm:10.1.0"
dependencies:
env-paths: ^2.2.0
exponential-backoff: ^3.1.1
Expand All @@ -8020,7 +8019,7 @@ __metadata:
which: ^4.0.0
bin:
node-gyp: bin/node-gyp.js
checksum: 60a74e66d364903ce02049966303a57f898521d139860ac82744a5fdd9f7b7b3b61f75f284f3bfe6e6add3b8f1871ce305a1d41f775c7482de837b50c792223f
checksum: 72e2ab4b23fc32007a763da94018f58069fc0694bf36115d49a2b195c8831e12cf5dd1e7a3718fa85c06969aedf8fc126722d3b672ec1cb27e06ed33caee3c60
languageName: node
linkType: hard

Expand Down Expand Up @@ -8208,12 +8207,13 @@ __metadata:
linkType: hard

"object.hasown@npm:^1.1.3":
version: 1.1.3
resolution: "object.hasown@npm:1.1.3"
version: 1.1.4
resolution: "object.hasown@npm:1.1.4"
dependencies:
define-properties: ^1.2.0
es-abstract: ^1.22.1
checksum: 76bc17356f6124542fb47e5d0e78d531eafa4bba3fc2d6fc4b1a8ce8b6878912366c0d99f37ce5c84ada8fd79df7aa6ea1214fddf721f43e093ad2df51f27da1
define-properties: ^1.2.1
es-abstract: ^1.23.2
es-object-atoms: ^1.0.0
checksum: bc46eb5ca22106fcd07aab1411508c2c68b7565fe8fb272f166fb9bf203972e8b5c86a5a4b2c86204beead0626a7a4119d32cefbaf7c5dd57b400bf9e6363cb6
languageName: node
linkType: hard

Expand Down Expand Up @@ -8978,11 +8978,11 @@ __metadata:
linkType: hard

"react-hook-form@npm:^7.45.4":
version: 7.51.1
resolution: "react-hook-form@npm:7.51.1"
version: 7.51.2
resolution: "react-hook-form@npm:7.51.2"
peerDependencies:
react: ^16.8.0 || ^17 || ^18
checksum: 6ed9060ac9230a7e9e6ca46fc001cc5f44f35e6485e0c951ab1a5e85bd698c200a7230c5514f0642875e4f45f6cb8f79479deac0253f1c2b8db1445d1c96d796
checksum: d725475587bc64c048927c0442693630fe1238e424d48996626a394811e495fb7019b20a657de6bb2e77385044592dd5d885fafb420d12bffc8a07c5a7d85872
languageName: node
linkType: hard

Expand Down Expand Up @@ -9580,7 +9580,7 @@ __metadata:
"@hookform/resolvers": ^3.3.1
"@mui/icons-material": ^5.14.3
"@mui/material": ^5.14.3
"@rarimo/client": ^2.3.0
"@rarimo/client": ^2.4.0
"@types/lodash-es": ^4
"@types/negotiator": ^0
"@types/node": 20.4.5
Expand Down Expand Up @@ -10631,15 +10631,15 @@ __metadata:
linkType: hard

"table@npm:^6.8.1":
version: 6.8.1
resolution: "table@npm:6.8.1"
version: 6.8.2
resolution: "table@npm:6.8.2"
dependencies:
ajv: ^8.0.1
lodash.truncate: ^4.4.2
slice-ansi: ^4.0.0
string-width: ^4.2.3
strip-ansi: ^6.0.1
checksum: 08249c7046125d9d0a944a6e96cfe9ec66908d6b8a9db125531be6eb05fa0de047fd5542e9d43b4f987057f00a093b276b8d3e19af162a9c40db2681058fd306
checksum: 61188652f53a980d1759ca460ca8dea5c5322aece3210457e7084882f053c2b6a870041295e08a82cb1d676e31b056406845d94b0abf3c79a4b104777bec413b
languageName: node
linkType: hard

Expand Down

0 comments on commit c91332a

Please sign in to comment.