From a349207b8b41fb19dd5cf9eacbafdcde6c64c81e Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Mon, 20 Jun 2022 20:09:46 +0900 Subject: [PATCH 01/77] Revert "fix: for release to disable metamask related features" This reverts commit 61dca8a3cd88a28cdacbc8b3a0b91119d5448ee2. --- .../src/lib/models/cosmos/tx/common/tx-common.service.ts | 4 +--- .../src/lib/models/wallets/wallet.application.service.ts | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts index 69bd1d7a3..30b9820e4 100644 --- a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts +++ b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts @@ -141,9 +141,7 @@ export class TxCommonService { return this.signTxWithKeyStation(txBuilder, signerBaseAccount); } if (currentCosmosWallet.type === WalletType.metaMask) { - // Todo: Currently disabled MetaMask related features. - throw Error('Unsupported wallet type!'); - // return this.signTxWithMetaMask(txBuilder, signerBaseAccount); + return this.signTxWithMetaMask(txBuilder, signerBaseAccount); } throw Error('Unsupported wallet type!'); } diff --git a/projects/shared/src/lib/models/wallets/wallet.application.service.ts b/projects/shared/src/lib/models/wallets/wallet.application.service.ts index 02f46fcae..2df7e878c 100644 --- a/projects/shared/src/lib/models/wallets/wallet.application.service.ts +++ b/projects/shared/src/lib/models/wallets/wallet.application.service.ts @@ -55,11 +55,8 @@ export class WalletApplicationService { } if (selectedWalletType === WalletType.metaMask) { - // Todo: Currently disabled MetaMask related features. - this.snackBar.open('Selected Wallet is not supported yet!', 'Close'); + await this.metaMaskConnectWallet(); return; - // await this.metaMaskConnectWallet(); - // return; } this.snackBar.open('Invalid wallet type!', 'Close'); From 97862ad155526048c09bab67f3ffc5e1429909d6 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Mon, 20 Jun 2022 20:09:54 +0900 Subject: [PATCH 02/77] Revert "fix: for release to disable metamask related features" This reverts commit 54bc34afe4e4ff5ce48942d834c11f0c75454657. --- projects/portal/src/app/models/cosmos/tx-common.service.ts | 4 +--- .../src/app/models/wallets/wallet.application.service.ts | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/projects/portal/src/app/models/cosmos/tx-common.service.ts b/projects/portal/src/app/models/cosmos/tx-common.service.ts index 70c83f063..4cdac239a 100644 --- a/projects/portal/src/app/models/cosmos/tx-common.service.ts +++ b/projects/portal/src/app/models/cosmos/tx-common.service.ts @@ -146,9 +146,7 @@ export class TxCommonService { return this.signTxWithKeyStation(txBuilder, signerBaseAccount); } if (currentCosmosWallet.type === WalletType.metaMask) { - // Todo: Currently disabled MetaMask related features. - throw Error('Unsupported wallet type!'); - // return this.signTxWithMetaMask(txBuilder, signerBaseAccount); + return this.signTxWithMetaMask(txBuilder, signerBaseAccount); } throw Error('Unsupported wallet type!'); } diff --git a/projects/portal/src/app/models/wallets/wallet.application.service.ts b/projects/portal/src/app/models/wallets/wallet.application.service.ts index 850f6c6fe..0db2f24ae 100644 --- a/projects/portal/src/app/models/wallets/wallet.application.service.ts +++ b/projects/portal/src/app/models/wallets/wallet.application.service.ts @@ -94,11 +94,8 @@ export class WalletApplicationService { } if (selectedWalletType === WalletType.metaMask) { - // Todo: Currently disabled MetaMask related features. - this.snackBar.open('Selected Wallet is not supported yet!', 'Close'); + await this.metaMaskConnectWallet(); return; - // await this.metaMaskConnectWallet(); - // return; } this.snackBar.open('Invalid wallet type!', 'Close'); From 96332642e1a7a0dc48e45bd54e7c3e558b553f6e Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Tue, 21 Jun 2022 18:18:42 +0900 Subject: [PATCH 03/77] chore: bump @cosmos-client/core to v0.46.0-rc1 and ununifi-client to v0.46.0-rc1 --- package-lock.json | 30 +++++++++++++++--------------- package.json | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index 697059016..ef1c3fb77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.45.9", + "@cosmos-client/core": "^0.46.0-rc1", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -47,7 +47,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.3.0", - "ununifi-client": "^0.45.1", + "ununifi-client": "^0.46.0-rc1", "zone.js": "~0.11.4" }, "devDependencies": { @@ -3180,9 +3180,9 @@ "dev": true }, "node_modules/@cosmos-client/core": { - "version": "0.45.9", - "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.45.9.tgz", - "integrity": "sha512-qHZC9jTA/7AVuroBOXyPGFPFqffz7UnlzjT0hBCcZh4IqyoJfKaYzsPUNb6JQ3x0UO9wq7O/AK98O/beL1FSWw==", + "version": "0.46.0-rc1", + "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc1.tgz", + "integrity": "sha512-n5ZxjSgfvkiVzawluz5vZ2Ly1GoenkDLFW4V8ka/rjYhWjlSiMJjtjll5DmCkeDaQ0sjACf/1Tzb0iblCfzT7w==", "dependencies": { "axios": "^0.23.0", "bech32": "^1.1.4", @@ -40486,15 +40486,15 @@ } }, "node_modules/ununifi-client": { - "version": "0.45.1", - "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.45.1.tgz", - "integrity": "sha512-tvIzWFccCR0TtKgR+2zpJSgvceb3u7E1bKIpojQj8thbVhXQFYbhva4Bxewr5/dlH0j6WE0DJEL+sLaPvOD6mA==", + "version": "0.46.0-rc1", + "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.46.0-rc1.tgz", + "integrity": "sha512-VcxDVG/FfIGxNmB9nL0Rb5fjt+QfsNBunUR5KHk5a7qvN22LendPOLxzFZJ/X4LeyOwW3xPJAzGRvfMS8ZbDcA==", "dependencies": { "axios": "^0.21.1", "protobufjs": "^6.11.2" }, "peerDependencies": { - "@cosmos-client/core": "^0.45.1" + "@cosmos-client/core": "^0.46.0-rc1" } }, "node_modules/ununifi-client/node_modules/axios": { @@ -44372,9 +44372,9 @@ "dev": true }, "@cosmos-client/core": { - "version": "0.45.9", - "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.45.9.tgz", - "integrity": "sha512-qHZC9jTA/7AVuroBOXyPGFPFqffz7UnlzjT0hBCcZh4IqyoJfKaYzsPUNb6JQ3x0UO9wq7O/AK98O/beL1FSWw==", + "version": "0.46.0-rc1", + "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc1.tgz", + "integrity": "sha512-n5ZxjSgfvkiVzawluz5vZ2Ly1GoenkDLFW4V8ka/rjYhWjlSiMJjtjll5DmCkeDaQ0sjACf/1Tzb0iblCfzT7w==", "requires": { "axios": "^0.23.0", "bech32": "^1.1.4", @@ -73356,9 +73356,9 @@ "dev": true }, "ununifi-client": { - "version": "0.45.1", - "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.45.1.tgz", - "integrity": "sha512-tvIzWFccCR0TtKgR+2zpJSgvceb3u7E1bKIpojQj8thbVhXQFYbhva4Bxewr5/dlH0j6WE0DJEL+sLaPvOD6mA==", + "version": "0.46.0-rc1", + "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.46.0-rc1.tgz", + "integrity": "sha512-VcxDVG/FfIGxNmB9nL0Rb5fjt+QfsNBunUR5KHk5a7qvN22LendPOLxzFZJ/X4LeyOwW3xPJAzGRvfMS8ZbDcA==", "requires": { "axios": "^0.21.1", "protobufjs": "^6.11.2" diff --git a/package.json b/package.json index 2de11fd00..7a195739e 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.45.9", + "@cosmos-client/core": "^0.46.0-rc1", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -78,7 +78,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.3.0", - "ununifi-client": "^0.45.1", + "ununifi-client": "^0.46.0-rc1", "zone.js": "~0.11.4" }, "devDependencies": { From deb3753dc9cd70a8d9dcdccdda22df76afa660b3 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Tue, 21 Jun 2022 18:20:09 +0900 Subject: [PATCH 04/77] fix: blocks data type name change from InlineResponse20036 to InlineResponse20011 --- .../src/app/pages/blocks/block/block.component.ts | 4 ++-- .../explorer/src/app/pages/blocks/blocks.component.ts | 4 ++-- .../src/app/pages/dashboard/blocks/blocks.component.ts | 4 ++-- .../src/app/pages/home/blocks/blocks.component.ts | 4 ++-- .../src/app/views/blocks/block/block.component.ts | 4 ++-- .../src/app/views/home/blocks/blocks.component.ts | 8 ++++---- .../portal/src/app/pages/home/blocks/blocks.component.ts | 6 +++--- .../portal/src/app/views/home/blocks/blocks.component.ts | 8 ++++---- 8 files changed, 21 insertions(+), 21 deletions(-) diff --git a/projects/explorer/src/app/pages/blocks/block/block.component.ts b/projects/explorer/src/app/pages/blocks/block/block.component.ts index 14803612c..3d94e2e06 100644 --- a/projects/explorer/src/app/pages/blocks/block/block.component.ts +++ b/projects/explorer/src/app/pages/blocks/block/block.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20036 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; import { CosmosTxV1beta1GetTxsEventResponse } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { combineLatest, Observable } from 'rxjs'; @@ -14,7 +14,7 @@ import { map, filter, mergeMap } from 'rxjs/operators'; }) export class BlockComponent implements OnInit { blockHeight$: Observable; - block$: Observable; + block$: Observable; nextBlock$: Observable; previousBlock$: Observable; latestBlockHeight$: Observable; diff --git a/projects/explorer/src/app/pages/blocks/blocks.component.ts b/projects/explorer/src/app/pages/blocks/blocks.component.ts index 3b179c3ef..69b6f700c 100644 --- a/projects/explorer/src/app/pages/blocks/blocks.component.ts +++ b/projects/explorer/src/app/pages/blocks/blocks.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20035, InlineResponse20036 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20035, InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer, combineLatest, BehaviorSubject } from 'rxjs'; import { filter, catchError, map, switchMap, mergeMap } from 'rxjs/operators'; @@ -24,7 +24,7 @@ export class BlocksComponent implements OnInit { latestBlock$: Observable; latestBlockHeight$: Observable; firstBlockHeight$: Observable; - blocks$: Observable; + blocks$: Observable; autoEnabled: BehaviorSubject = new BehaviorSubject(false); isFirstAccess: boolean; diff --git a/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts b/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts index 3b179c3ef..69b6f700c 100644 --- a/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts +++ b/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20035, InlineResponse20036 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20035, InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer, combineLatest, BehaviorSubject } from 'rxjs'; import { filter, catchError, map, switchMap, mergeMap } from 'rxjs/operators'; @@ -24,7 +24,7 @@ export class BlocksComponent implements OnInit { latestBlock$: Observable; latestBlockHeight$: Observable; firstBlockHeight$: Observable; - blocks$: Observable; + blocks$: Observable; autoEnabled: BehaviorSubject = new BehaviorSubject(false); isFirstAccess: boolean; diff --git a/projects/explorer/src/app/pages/home/blocks/blocks.component.ts b/projects/explorer/src/app/pages/home/blocks/blocks.component.ts index 4933371e5..8926fe592 100644 --- a/projects/explorer/src/app/pages/home/blocks/blocks.component.ts +++ b/projects/explorer/src/app/pages/home/blocks/blocks.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20036, InlineResponse20035 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20011, InlineResponse20035 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer } from 'rxjs'; import { catchError, map, mergeMap } from 'rxjs/operators'; @@ -15,7 +15,7 @@ export class BlocksComponent implements OnInit { pollingInterval = 30 * 60; latestBlock$: Observable; latestBlockHeight$: Observable; - //latestBlocks$: Observable; + //latestBlocks$: Observable; latestBlocks$: Observable; constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { diff --git a/projects/explorer/src/app/views/blocks/block/block.component.ts b/projects/explorer/src/app/views/blocks/block/block.component.ts index e4664d90a..04e345103 100644 --- a/projects/explorer/src/app/views/blocks/block/block.component.ts +++ b/projects/explorer/src/app/views/blocks/block/block.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { InlineResponse20036 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; import { CosmosTxV1beta1GetTxsEventResponse } from '@cosmos-client/core/esm/openapi/api'; @Component({ @@ -9,7 +9,7 @@ import { CosmosTxV1beta1GetTxsEventResponse } from '@cosmos-client/core/esm/open }) export class BlockComponent implements OnInit { @Input() - block?: InlineResponse20036 | null; + block?: InlineResponse20011 | null; @Input() nextBlock?: number | null; diff --git a/projects/explorer/src/app/views/home/blocks/blocks.component.ts b/projects/explorer/src/app/views/home/blocks/blocks.component.ts index c531e4a3f..b2692c1ff 100644 --- a/projects/explorer/src/app/views/home/blocks/blocks.component.ts +++ b/projects/explorer/src/app/views/home/blocks/blocks.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { InlineResponse20036 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-blocks', @@ -8,10 +8,10 @@ import { InlineResponse20036 } from '@cosmos-client/core/esm/openapi'; }) export class BlocksComponent implements OnInit { @Input() - //latestBlocks?: InlineResponse20036[] | null | undefined; + //latestBlocks?: InlineResponse20011[] | null | undefined; latestBlocks?: bigint[] | null | undefined; - constructor() { } + constructor() {} - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/projects/portal/src/app/pages/home/blocks/blocks.component.ts b/projects/portal/src/app/pages/home/blocks/blocks.component.ts index 00cc92fd6..8edb81ccd 100644 --- a/projects/portal/src/app/pages/home/blocks/blocks.component.ts +++ b/projects/portal/src/app/pages/home/blocks/blocks.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20036, InlineResponse20035 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20011, InlineResponse20035 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer } from 'rxjs'; import { catchError, map, mergeMap } from 'rxjs/operators'; @@ -15,7 +15,7 @@ export class BlocksComponent implements OnInit { pollingInterval = 30 * 60; latestBlock$: Observable; latestBlockHeight$: Observable; - //latestBlocks$: Observable; + //latestBlocks$: Observable; latestBlocks$: Observable; constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { @@ -65,5 +65,5 @@ export class BlocksComponent implements OnInit { ); } - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/projects/portal/src/app/views/home/blocks/blocks.component.ts b/projects/portal/src/app/views/home/blocks/blocks.component.ts index c531e4a3f..b2692c1ff 100644 --- a/projects/portal/src/app/views/home/blocks/blocks.component.ts +++ b/projects/portal/src/app/views/home/blocks/blocks.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { InlineResponse20036 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-blocks', @@ -8,10 +8,10 @@ import { InlineResponse20036 } from '@cosmos-client/core/esm/openapi'; }) export class BlocksComponent implements OnInit { @Input() - //latestBlocks?: InlineResponse20036[] | null | undefined; + //latestBlocks?: InlineResponse20011[] | null | undefined; latestBlocks?: bigint[] | null | undefined; - constructor() { } + constructor() {} - ngOnInit(): void { } + ngOnInit(): void {} } From 568ab8d81464c3a7e53a3ab4dc4e10021f82b646 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Tue, 21 Jun 2022 18:28:28 +0900 Subject: [PATCH 05/77] fix: block related type name from InlineResponse20035 to InlineResponse20010 --- projects/explorer/src/app/pages/blocks/blocks.component.ts | 4 ++-- .../src/app/pages/dashboard/blocks/blocks.component.ts | 4 ++-- .../explorer/src/app/pages/dashboard/dashboard.component.ts | 4 ++-- .../explorer/src/app/pages/home/blocks/blocks.component.ts | 4 ++-- projects/explorer/src/app/views/blocks/blocks.component.ts | 4 ++-- .../src/app/views/dashboard/blocks/blocks.component.ts | 4 ++-- projects/portal/src/app/pages/home/blocks/blocks.component.ts | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/projects/explorer/src/app/pages/blocks/blocks.component.ts b/projects/explorer/src/app/pages/blocks/blocks.component.ts index 69b6f700c..ef33ad6ab 100644 --- a/projects/explorer/src/app/pages/blocks/blocks.component.ts +++ b/projects/explorer/src/app/pages/blocks/blocks.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20035, InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20010, InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer, combineLatest, BehaviorSubject } from 'rxjs'; import { filter, catchError, map, switchMap, mergeMap } from 'rxjs/operators'; @@ -21,7 +21,7 @@ export class BlocksComponent implements OnInit { defaultPageNumber = 1; pollingInterval = 5; - latestBlock$: Observable; + latestBlock$: Observable; latestBlockHeight$: Observable; firstBlockHeight$: Observable; blocks$: Observable; diff --git a/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts b/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts index 69b6f700c..ef33ad6ab 100644 --- a/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts +++ b/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20035, InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20010, InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer, combineLatest, BehaviorSubject } from 'rxjs'; import { filter, catchError, map, switchMap, mergeMap } from 'rxjs/operators'; @@ -21,7 +21,7 @@ export class BlocksComponent implements OnInit { defaultPageNumber = 1; pollingInterval = 5; - latestBlock$: Observable; + latestBlock$: Observable; latestBlockHeight$: Observable; firstBlockHeight$: Observable; blocks$: Observable; diff --git a/projects/explorer/src/app/pages/dashboard/dashboard.component.ts b/projects/explorer/src/app/pages/dashboard/dashboard.component.ts index 9388ac7cf..8ec8ce28d 100644 --- a/projects/explorer/src/app/pages/dashboard/dashboard.component.ts +++ b/projects/explorer/src/app/pages/dashboard/dashboard.component.ts @@ -4,7 +4,7 @@ import { rest } from '@cosmos-client/core'; import { pool } from '@cosmos-client/core/cjs/rest/staking/module'; import { CosmosMintV1beta1QueryInflationResponse, - InlineResponse20035, + InlineResponse20010, InlineResponse20069, InlineResponse20070, QueryTotalSupplyResponseIsTheResponseTypeForTheQueryTotalSupplyRPCMethod, @@ -19,7 +19,7 @@ import { catchError, map, mergeMap } from 'rxjs/operators'; }) export class DashboardComponent implements OnInit { pollingInterval = 30 * 60; - latestBlock$: Observable; + latestBlock$: Observable; latestBlockHeight$: Observable; totalSupply$: Observable; stakedTokens$: Observable; diff --git a/projects/explorer/src/app/pages/home/blocks/blocks.component.ts b/projects/explorer/src/app/pages/home/blocks/blocks.component.ts index 8926fe592..37b4fff70 100644 --- a/projects/explorer/src/app/pages/home/blocks/blocks.component.ts +++ b/projects/explorer/src/app/pages/home/blocks/blocks.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20011, InlineResponse20035 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20011, InlineResponse20010 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer } from 'rxjs'; import { catchError, map, mergeMap } from 'rxjs/operators'; @@ -13,7 +13,7 @@ import { catchError, map, mergeMap } from 'rxjs/operators'; }) export class BlocksComponent implements OnInit { pollingInterval = 30 * 60; - latestBlock$: Observable; + latestBlock$: Observable; latestBlockHeight$: Observable; //latestBlocks$: Observable; latestBlocks$: Observable; diff --git a/projects/explorer/src/app/views/blocks/blocks.component.ts b/projects/explorer/src/app/views/blocks/blocks.component.ts index 7ca345074..65b731cd0 100644 --- a/projects/explorer/src/app/views/blocks/blocks.component.ts +++ b/projects/explorer/src/app/views/blocks/blocks.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; -import { InlineResponse20035 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20010 } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-blocks', @@ -9,7 +9,7 @@ import { InlineResponse20035 } from '@cosmos-client/core/esm/openapi'; }) export class BlocksComponent implements OnInit { @Input() - blocks?: InlineResponse20035[] | null; + blocks?: InlineResponse20010[] | null; @Input() pageSizeOptions?: number[] | null; diff --git a/projects/explorer/src/app/views/dashboard/blocks/blocks.component.ts b/projects/explorer/src/app/views/dashboard/blocks/blocks.component.ts index 7ca345074..65b731cd0 100644 --- a/projects/explorer/src/app/views/dashboard/blocks/blocks.component.ts +++ b/projects/explorer/src/app/views/dashboard/blocks/blocks.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; -import { InlineResponse20035 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20010 } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-blocks', @@ -9,7 +9,7 @@ import { InlineResponse20035 } from '@cosmos-client/core/esm/openapi'; }) export class BlocksComponent implements OnInit { @Input() - blocks?: InlineResponse20035[] | null; + blocks?: InlineResponse20010[] | null; @Input() pageSizeOptions?: number[] | null; diff --git a/projects/portal/src/app/pages/home/blocks/blocks.component.ts b/projects/portal/src/app/pages/home/blocks/blocks.component.ts index 8edb81ccd..7feda881e 100644 --- a/projects/portal/src/app/pages/home/blocks/blocks.component.ts +++ b/projects/portal/src/app/pages/home/blocks/blocks.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20011, InlineResponse20035 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20011, InlineResponse20010 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer } from 'rxjs'; import { catchError, map, mergeMap } from 'rxjs/operators'; @@ -13,7 +13,7 @@ import { catchError, map, mergeMap } from 'rxjs/operators'; }) export class BlocksComponent implements OnInit { pollingInterval = 30 * 60; - latestBlock$: Observable; + latestBlock$: Observable; latestBlockHeight$: Observable; //latestBlocks$: Observable; latestBlocks$: Observable; From 821ad9807bcb2c42d4cb4b0dde5f8de515438846 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Tue, 21 Jun 2022 18:34:13 +0900 Subject: [PATCH 06/77] fix: tx response data type name from InlineResponse20075TxResponse to InlineResponse20050TxResponse --- .../explorer/src/app/pages/dashboard/txs/txs.component.ts | 4 ++-- projects/explorer/src/app/pages/home/txs/txs.component.ts | 4 ++-- projects/explorer/src/app/pages/txs/txs.component.ts | 4 ++-- .../explorer/src/app/views/dashboard/txs/txs.component.ts | 4 ++-- projects/explorer/src/app/views/home/txs/txs.component.ts | 4 ++-- projects/explorer/src/app/views/txs/txs.component.ts | 8 ++++---- projects/portal/src/app/pages/home/txs/txs.component.ts | 4 ++-- projects/portal/src/app/pages/txs/txs.component.ts | 4 ++-- projects/portal/src/app/views/home/txs/txs.component.ts | 4 ++-- projects/portal/src/app/views/txs/txs.component.ts | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) diff --git a/projects/explorer/src/app/pages/dashboard/txs/txs.component.ts b/projects/explorer/src/app/pages/dashboard/txs/txs.component.ts index 1d1b5288a..df2ae4c7f 100644 --- a/projects/explorer/src/app/pages/dashboard/txs/txs.component.ts +++ b/projects/explorer/src/app/pages/dashboard/txs/txs.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi/api'; +import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/explorer/src/app/models/config.service'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { of, combineLatest, Observable, timer } from 'rxjs'; @@ -33,7 +33,7 @@ export class TxsComponent implements OnInit { paginationInfo$: Observable; paginationInfoChanged$: Observable; pageLength$: Observable; - txs$?: Observable; + txs$?: Observable; constructor( private router: Router, diff --git a/projects/explorer/src/app/pages/home/txs/txs.component.ts b/projects/explorer/src/app/pages/home/txs/txs.component.ts index 0bff60b9d..f5acd4e8d 100644 --- a/projects/explorer/src/app/pages/home/txs/txs.component.ts +++ b/projects/explorer/src/app/pages/home/txs/txs.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi/api'; +import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/explorer/src/app/models/config.service'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { BehaviorSubject, combineLatest, Observable, timer } from 'rxjs'; @@ -14,7 +14,7 @@ import { filter, map, mergeMap, switchMap } from 'rxjs/operators'; }) export class TxsComponent implements OnInit { pollingInterval = 30 * 60; - txs$?: Observable; + txs$?: Observable; txTypeOptions$?: Observable; pageSize$: BehaviorSubject = new BehaviorSubject(20); pageNumber$: BehaviorSubject = new BehaviorSubject(1); diff --git a/projects/explorer/src/app/pages/txs/txs.component.ts b/projects/explorer/src/app/pages/txs/txs.component.ts index 7ffdec111..559306146 100644 --- a/projects/explorer/src/app/pages/txs/txs.component.ts +++ b/projects/explorer/src/app/pages/txs/txs.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi/api'; +import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/explorer/src/app/models/config.service'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { of, combineLatest, Observable, timer } from 'rxjs'; @@ -33,7 +33,7 @@ export class TxsComponent implements OnInit { paginationInfo$: Observable; paginationInfoChanged$: Observable; pageLength$: Observable; - txs$?: Observable; + txs$?: Observable; constructor( private router: Router, diff --git a/projects/explorer/src/app/views/dashboard/txs/txs.component.ts b/projects/explorer/src/app/views/dashboard/txs/txs.component.ts index 6a1fca8c6..3d6929dd7 100644 --- a/projects/explorer/src/app/views/dashboard/txs/txs.component.ts +++ b/projects/explorer/src/app/views/dashboard/txs/txs.component.ts @@ -1,7 +1,7 @@ import { PaginationInfo } from '../../../pages/dashboard/txs/txs.component'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; -import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-txs', @@ -10,7 +10,7 @@ import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi'; }) export class TxsComponent implements OnInit { @Input() - txs?: InlineResponse20075TxResponse[] | null; + txs?: InlineResponse20050TxResponse[] | null; @Input() txTypeOptions?: string[] | null; @Input() diff --git a/projects/explorer/src/app/views/home/txs/txs.component.ts b/projects/explorer/src/app/views/home/txs/txs.component.ts index 85036397c..614192c6f 100644 --- a/projects/explorer/src/app/views/home/txs/txs.component.ts +++ b/projects/explorer/src/app/views/home/txs/txs.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-txs', @@ -8,7 +8,7 @@ import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi'; }) export class TxsComponent implements OnInit { @Input() - txs?: InlineResponse20075TxResponse[] | undefined | null; + txs?: InlineResponse20050TxResponse[] | undefined | null; @Input() txTypeOptions?: string[] | undefined | null; @Input() diff --git a/projects/explorer/src/app/views/txs/txs.component.ts b/projects/explorer/src/app/views/txs/txs.component.ts index accc286a6..7e41acb4f 100644 --- a/projects/explorer/src/app/views/txs/txs.component.ts +++ b/projects/explorer/src/app/views/txs/txs.component.ts @@ -1,7 +1,7 @@ +import { PaginationInfo } from '../../pages/txs/txs.component'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; -import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi'; -import { PaginationInfo } from '../../pages/txs/txs.component'; +import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-txs', @@ -10,7 +10,7 @@ import { PaginationInfo } from '../../pages/txs/txs.component'; }) export class TxsComponent implements OnInit { @Input() - txs?: InlineResponse20075TxResponse[] | null; + txs?: InlineResponse20050TxResponse[] | null; @Input() txTypeOptions?: string[] | null; @Input() @@ -34,7 +34,7 @@ export class TxsComponent implements OnInit { this.paginationChange = new EventEmitter(); } - ngOnInit(): void { } + ngOnInit(): void {} onSelectedTxTypeChanged(selectedTxType: string): void { this.selectedTxTypeChanged.emit(selectedTxType); diff --git a/projects/portal/src/app/pages/home/txs/txs.component.ts b/projects/portal/src/app/pages/home/txs/txs.component.ts index 8af14316b..00ade68bf 100644 --- a/projects/portal/src/app/pages/home/txs/txs.component.ts +++ b/projects/portal/src/app/pages/home/txs/txs.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi/api'; +import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { BehaviorSubject, combineLatest, Observable, timer } from 'rxjs'; @@ -14,7 +14,7 @@ import { filter, map, mergeMap, switchMap } from 'rxjs/operators'; }) export class TxsComponent implements OnInit { pollingInterval = 30 * 60; - txs$?: Observable; + txs$?: Observable; txTypeOptions$?: Observable; pageSize$: BehaviorSubject = new BehaviorSubject(20); pageNumber$: BehaviorSubject = new BehaviorSubject(1); diff --git a/projects/portal/src/app/pages/txs/txs.component.ts b/projects/portal/src/app/pages/txs/txs.component.ts index 7f5ef2f23..225ca9289 100644 --- a/projects/portal/src/app/pages/txs/txs.component.ts +++ b/projects/portal/src/app/pages/txs/txs.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi/api'; +import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { of, combineLatest, Observable, timer } from 'rxjs'; @@ -33,7 +33,7 @@ export class TxsComponent implements OnInit { paginationInfo$: Observable; paginationInfoChanged$: Observable; pageLength$: Observable; - txs$?: Observable; + txs$?: Observable; constructor( private router: Router, diff --git a/projects/portal/src/app/views/home/txs/txs.component.ts b/projects/portal/src/app/views/home/txs/txs.component.ts index 85036397c..614192c6f 100644 --- a/projects/portal/src/app/views/home/txs/txs.component.ts +++ b/projects/portal/src/app/views/home/txs/txs.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-txs', @@ -8,7 +8,7 @@ import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi'; }) export class TxsComponent implements OnInit { @Input() - txs?: InlineResponse20075TxResponse[] | undefined | null; + txs?: InlineResponse20050TxResponse[] | undefined | null; @Input() txTypeOptions?: string[] | undefined | null; @Input() diff --git a/projects/portal/src/app/views/txs/txs.component.ts b/projects/portal/src/app/views/txs/txs.component.ts index 290e7b308..7e41acb4f 100644 --- a/projects/portal/src/app/views/txs/txs.component.ts +++ b/projects/portal/src/app/views/txs/txs.component.ts @@ -1,7 +1,7 @@ import { PaginationInfo } from '../../pages/txs/txs.component'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; -import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-txs', @@ -10,7 +10,7 @@ import { InlineResponse20075TxResponse } from '@cosmos-client/core/esm/openapi'; }) export class TxsComponent implements OnInit { @Input() - txs?: InlineResponse20075TxResponse[] | null; + txs?: InlineResponse20050TxResponse[] | null; @Input() txTypeOptions?: string[] | null; @Input() From a20424659e902874a39bd9abe6e9ada3adcf43de Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Tue, 21 Jun 2022 18:49:54 +0900 Subject: [PATCH 07/77] fix: proposal deposit tally vote related data type name from InlineResponse20052Proposals to InlineResponse20027Proposals from InlineResponse20054Deposits to InlineResponse20029Deposits from InlineResponse20052FinalTallyResult to InlineResponse20027FinalTallyResult from InlineResponse20057Votes to InlineResponse20032Votes from InlineResponse20051DepositParams to InlineResponse20026DepositParams from InlineResponse20051TallyParams to InlineResponse20026TallyParams from InlineResponse20051VotingParams to InlineResponse20026VotingParams --- .../proposals/proposal/proposal.component.ts | 28 +++++++++---------- .../pages/proposals/proposals.component.ts | 8 +++--- .../proposals/proposal/proposal.component.ts | 16 +++++------ .../proposals/proposal/proposal.component.ts | 28 +++++++++---------- .../views/proposals/proposals.component.ts | 8 +++--- .../deposit-form-dialog.component.ts | 4 +-- .../vote-form-dialog.component.ts | 4 +-- .../proposals/proposal/proposal.component.ts | 28 +++++++++---------- .../vote/proposals/proposals.component.ts | 8 +++--- .../deposit/deposit-form-dialog.component.ts | 4 +-- .../vote/vote/vote-form-dialog.component.ts | 4 +-- .../proposals/proposal/proposal.component.ts | 28 +++++++++---------- .../vote/proposals/proposals.component.ts | 8 +++--- 13 files changed, 88 insertions(+), 88 deletions(-) diff --git a/projects/explorer/src/app/pages/proposals/proposal/proposal.component.ts b/projects/explorer/src/app/pages/proposals/proposal/proposal.component.ts index b472927bd..aabf9dfbd 100644 --- a/projects/explorer/src/app/pages/proposals/proposal/proposal.component.ts +++ b/projects/explorer/src/app/pages/proposals/proposal/proposal.component.ts @@ -2,13 +2,13 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; import { - InlineResponse20052Proposals, - InlineResponse20054Deposits, - InlineResponse20052FinalTallyResult, - InlineResponse20057Votes, - InlineResponse20051DepositParams, - InlineResponse20051TallyParams, - InlineResponse20051VotingParams, + InlineResponse20027Proposals, + InlineResponse20029Deposits, + InlineResponse20027FinalTallyResult, + InlineResponse20032Votes, + InlineResponse20026DepositParams, + InlineResponse20026TallyParams, + InlineResponse20026VotingParams, } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { combineLatest, Observable, of } from 'rxjs'; @@ -20,14 +20,14 @@ import { catchError, map, mergeMap } from 'rxjs/operators'; styleUrls: ['./proposal.component.css'], }) export class ProposalComponent implements OnInit { - proposal$: Observable; + proposal$: Observable; proposalType$: Observable; - deposits$: Observable; - depositParams$: Observable; - tally$: Observable; - tallyParams$: Observable; - votes$: Observable; - votingParams$: Observable; + deposits$: Observable; + depositParams$: Observable; + tally$: Observable; + tallyParams$: Observable; + votes$: Observable; + votingParams$: Observable; constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { const proposalID$ = this.route.params.pipe(map((params) => params.id)); diff --git a/projects/explorer/src/app/pages/proposals/proposals.component.ts b/projects/explorer/src/app/pages/proposals/proposals.component.ts index dfa5c97e5..acdddeb5f 100644 --- a/projects/explorer/src/app/pages/proposals/proposals.component.ts +++ b/projects/explorer/src/app/pages/proposals/proposals.component.ts @@ -2,8 +2,8 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; import { - InlineResponse20052FinalTallyResult, - InlineResponse20052Proposals, + InlineResponse20027FinalTallyResult, + InlineResponse20027Proposals, } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { combineLatest, Observable } from 'rxjs'; @@ -15,8 +15,8 @@ import { map, mergeMap } from 'rxjs/operators'; styleUrls: ['./proposals.component.css'], }) export class ProposalsComponent implements OnInit { - proposals$: Observable; - tallies$: Observable<(InlineResponse20052FinalTallyResult | undefined)[]>; + proposals$: Observable; + tallies$: Observable<(InlineResponse20027FinalTallyResult | undefined)[]>; constructor( private readonly route: ActivatedRoute, diff --git a/projects/explorer/src/app/views/cosmos/gov/proposals/proposal/proposal.component.ts b/projects/explorer/src/app/views/cosmos/gov/proposals/proposal/proposal.component.ts index 464851b9a..1d52582bb 100644 --- a/projects/explorer/src/app/views/cosmos/gov/proposals/proposal/proposal.component.ts +++ b/projects/explorer/src/app/views/cosmos/gov/proposals/proposal/proposal.component.ts @@ -1,9 +1,9 @@ import { Component, Input, OnInit } from '@angular/core'; import { - InlineResponse20052Proposals, - InlineResponse20054Deposits, - InlineResponse20052FinalTallyResult, - InlineResponse20057Votes, + InlineResponse20027Proposals, + InlineResponse20029Deposits, + InlineResponse20027FinalTallyResult, + InlineResponse20032Votes, } from '@cosmos-client/core/esm/openapi'; @Component({ @@ -13,13 +13,13 @@ import { }) export class ProposalComponent implements OnInit { @Input() - proposal?: InlineResponse20052Proposals | null; + proposal?: InlineResponse20027Proposals | null; @Input() - deposits?: InlineResponse20054Deposits[] | null; + deposits?: InlineResponse20029Deposits[] | null; @Input() - tally?: InlineResponse20052FinalTallyResult | null; + tally?: InlineResponse20027FinalTallyResult | null; @Input() - votes?: InlineResponse20057Votes[] | null; + votes?: InlineResponse20032Votes[] | null; constructor() {} diff --git a/projects/explorer/src/app/views/proposals/proposal/proposal.component.ts b/projects/explorer/src/app/views/proposals/proposal/proposal.component.ts index 2e5bdeba7..caa268787 100644 --- a/projects/explorer/src/app/views/proposals/proposal/proposal.component.ts +++ b/projects/explorer/src/app/views/proposals/proposal/proposal.component.ts @@ -2,13 +2,13 @@ import { ProposalContent } from '../proposals.component'; import { Component, Input, OnInit } from '@angular/core'; import { cosmosclient } from '@cosmos-client/core'; import { - InlineResponse20052Proposals, - InlineResponse20054Deposits, - InlineResponse20052FinalTallyResult, - InlineResponse20057Votes, - InlineResponse20051DepositParams, - InlineResponse20051TallyParams, - InlineResponse20051VotingParams, + InlineResponse20027Proposals, + InlineResponse20029Deposits, + InlineResponse20027FinalTallyResult, + InlineResponse20032Votes, + InlineResponse20026DepositParams, + InlineResponse20026TallyParams, + InlineResponse20026VotingParams, } from '@cosmos-client/core/esm/openapi'; @Component({ @@ -18,21 +18,21 @@ import { }) export class ProposalComponent implements OnInit { @Input() - proposal?: InlineResponse20052Proposals | null; + proposal?: InlineResponse20027Proposals | null; @Input() proposalType?: string | null; @Input() - deposits?: InlineResponse20054Deposits[] | null; + deposits?: InlineResponse20029Deposits[] | null; @Input() - depositParams?: InlineResponse20051DepositParams | null; + depositParams?: InlineResponse20026DepositParams | null; @Input() - tally?: InlineResponse20052FinalTallyResult | null; + tally?: InlineResponse20027FinalTallyResult | null; @Input() - tallyParams?: InlineResponse20051TallyParams | null; + tallyParams?: InlineResponse20026TallyParams | null; @Input() - votes?: InlineResponse20057Votes[] | null; + votes?: InlineResponse20032Votes[] | null; @Input() - votingParams?: InlineResponse20051VotingParams | null; + votingParams?: InlineResponse20026VotingParams | null; constructor() {} diff --git a/projects/explorer/src/app/views/proposals/proposals.component.ts b/projects/explorer/src/app/views/proposals/proposals.component.ts index 3172fbd7d..7811b6ae7 100644 --- a/projects/explorer/src/app/views/proposals/proposals.component.ts +++ b/projects/explorer/src/app/views/proposals/proposals.component.ts @@ -1,8 +1,8 @@ import { Component, Input, OnInit } from '@angular/core'; import { cosmosclient } from '@cosmos-client/core'; import { - InlineResponse20052FinalTallyResult, - InlineResponse20052Proposals, + InlineResponse20027FinalTallyResult, + InlineResponse20027Proposals, } from '@cosmos-client/core/esm/openapi'; export interface ProposalContent { @@ -18,10 +18,10 @@ export interface ProposalContent { }) export class ProposalsComponent implements OnInit { @Input() - proposals?: InlineResponse20052Proposals[] | null; + proposals?: InlineResponse20027Proposals[] | null; @Input() - tallies?: (InlineResponse20052FinalTallyResult | undefined)[] | null; + tallies?: (InlineResponse20027FinalTallyResult | undefined)[] | null; constructor() {} diff --git a/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts index 6619b33f8..b3a56e96b 100644 --- a/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; -import { InlineResponse20052Proposals } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20027Proposals } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { GovApplicationService } from 'projects/portal/src/app/models/cosmos/gov.application.service'; @@ -17,7 +17,7 @@ import { catchError, filter, map, mergeMap } from 'rxjs/operators'; styleUrls: ['./deposit-form-dialog.component.css'], }) export class DepositFormDialogComponent implements OnInit { - proposal$: Observable; + proposal$: Observable; currentStoredWallet$: Observable; coins$: Observable; uguuBalance$: Observable | undefined; diff --git a/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts index 5696d1c35..a71e090e2 100644 --- a/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; -import { InlineResponse20052Proposals } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20027Proposals } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { GovApplicationService } from 'projects/portal/src/app/models/cosmos/gov.application.service'; @@ -17,7 +17,7 @@ import { catchError, filter, map, mergeMap } from 'rxjs/operators'; styleUrls: ['./vote-form-dialog.component.css'], }) export class VoteFormDialogComponent implements OnInit { - proposal$: Observable; + proposal$: Observable; currentStoredWallet$: Observable; coins$: Observable; uguuBalance$: Observable | undefined; diff --git a/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts b/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts index ea1e6c693..60924241a 100644 --- a/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts +++ b/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts @@ -2,13 +2,13 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; import { - InlineResponse20052Proposals, - InlineResponse20054Deposits, - InlineResponse20052FinalTallyResult, - InlineResponse20057Votes, - InlineResponse20051DepositParams, - InlineResponse20051TallyParams, - InlineResponse20051VotingParams, + InlineResponse20027Proposals, + InlineResponse20029Deposits, + InlineResponse20027FinalTallyResult, + InlineResponse20032Votes, + InlineResponse20026DepositParams, + InlineResponse20026TallyParams, + InlineResponse20026VotingParams, } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { GovApplicationService } from 'projects/portal/src/app/models/cosmos/gov.application.service'; @@ -21,14 +21,14 @@ import { catchError, map, mergeMap } from 'rxjs/operators'; styleUrls: ['./proposal.component.css'], }) export class ProposalComponent implements OnInit { - proposal$: Observable; + proposal$: Observable; proposalType$: Observable; - deposits$: Observable; - depositParams$: Observable; - tally$: Observable; - tallyParams$: Observable; - votes$: Observable; - votingParams$: Observable; + deposits$: Observable; + depositParams$: Observable; + tally$: Observable; + tallyParams$: Observable; + votes$: Observable; + votingParams$: Observable; constructor( private route: ActivatedRoute, diff --git a/projects/portal/src/app/pages/vote/proposals/proposals.component.ts b/projects/portal/src/app/pages/vote/proposals/proposals.component.ts index d5a30016f..55da8c853 100644 --- a/projects/portal/src/app/pages/vote/proposals/proposals.component.ts +++ b/projects/portal/src/app/pages/vote/proposals/proposals.component.ts @@ -3,8 +3,8 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { rest } from '@cosmos-client/core'; import { - InlineResponse20052FinalTallyResult, - InlineResponse20052Proposals, + InlineResponse20027FinalTallyResult, + InlineResponse20027Proposals, } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { combineLatest, Observable, of } from 'rxjs'; @@ -16,8 +16,8 @@ import { map, mergeMap } from 'rxjs/operators'; styleUrls: ['./proposals.component.css'], }) export class ProposalsComponent implements OnInit { - proposals$: Observable; - tallies$: Observable<(InlineResponse20052FinalTallyResult | undefined)[]>; + proposals$: Observable; + tallies$: Observable<(InlineResponse20027FinalTallyResult | undefined)[]>; constructor( private readonly route: ActivatedRoute, diff --git a/projects/portal/src/app/views/dialogs/vote/deposit/deposit-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/vote/deposit/deposit-form-dialog.component.ts index ab5d402a7..f0bef6a93 100644 --- a/projects/portal/src/app/views/dialogs/vote/deposit/deposit-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/vote/deposit/deposit-form-dialog.component.ts @@ -1,7 +1,7 @@ import { ProposalContent } from '../../../vote/proposals/proposals.component'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20052Proposals } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20027Proposals } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -18,7 +18,7 @@ export type DepositOnSubmitEvent = { }) export class DepositFormDialogComponent implements OnInit { @Input() - proposal?: InlineResponse20052Proposals | null; + proposal?: InlineResponse20027Proposals | null; @Input() currentStoredWallet?: StoredWallet | null; @Input() diff --git a/projects/portal/src/app/views/dialogs/vote/vote/vote-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/vote/vote/vote-form-dialog.component.ts index 09a7e2a00..296a20cea 100644 --- a/projects/portal/src/app/views/dialogs/vote/vote/vote-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/vote/vote/vote-form-dialog.component.ts @@ -1,7 +1,7 @@ import { ProposalContent } from '../../../vote/proposals/proposals.component'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20052Proposals } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20027Proposals } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -17,7 +17,7 @@ export type VoteOnSubmitEvent = { }) export class VoteFormDialogComponent implements OnInit { @Input() - proposal?: InlineResponse20052Proposals | null; + proposal?: InlineResponse20027Proposals | null; @Input() currentStoredWallet?: StoredWallet | null; @Input() diff --git a/projects/portal/src/app/views/vote/proposals/proposal/proposal.component.ts b/projects/portal/src/app/views/vote/proposals/proposal/proposal.component.ts index c3fd60fa0..7014c618f 100644 --- a/projects/portal/src/app/views/vote/proposals/proposal/proposal.component.ts +++ b/projects/portal/src/app/views/vote/proposals/proposal/proposal.component.ts @@ -2,13 +2,13 @@ import { ProposalContent } from '../proposals.component'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { cosmosclient } from '@cosmos-client/core'; import { - InlineResponse20052Proposals, - InlineResponse20054Deposits, - InlineResponse20052FinalTallyResult, - InlineResponse20057Votes, - InlineResponse20051DepositParams, - InlineResponse20051TallyParams, - InlineResponse20051VotingParams, + InlineResponse20027Proposals, + InlineResponse20029Deposits, + InlineResponse20027FinalTallyResult, + InlineResponse20032Votes, + InlineResponse20026DepositParams, + InlineResponse20026TallyParams, + InlineResponse20026VotingParams, } from '@cosmos-client/core/esm/openapi'; @Component({ @@ -18,21 +18,21 @@ import { }) export class ProposalComponent implements OnInit { @Input() - proposal?: InlineResponse20052Proposals | null; + proposal?: InlineResponse20027Proposals | null; @Input() proposalType?: string | null; @Input() - deposits?: InlineResponse20054Deposits[] | null; + deposits?: InlineResponse20029Deposits[] | null; @Input() - depositParams?: InlineResponse20051DepositParams | null; + depositParams?: InlineResponse20026DepositParams | null; @Input() - tally?: InlineResponse20052FinalTallyResult | null; + tally?: InlineResponse20027FinalTallyResult | null; @Input() - tallyParams?: InlineResponse20051TallyParams | null; + tallyParams?: InlineResponse20026TallyParams | null; @Input() - votes?: InlineResponse20057Votes[] | null; + votes?: InlineResponse20032Votes[] | null; @Input() - votingParams?: InlineResponse20051VotingParams | null; + votingParams?: InlineResponse20026VotingParams | null; @Output() appClickVote: EventEmitter; diff --git a/projects/portal/src/app/views/vote/proposals/proposals.component.ts b/projects/portal/src/app/views/vote/proposals/proposals.component.ts index 7cc595171..18be36c60 100644 --- a/projects/portal/src/app/views/vote/proposals/proposals.component.ts +++ b/projects/portal/src/app/views/vote/proposals/proposals.component.ts @@ -1,8 +1,8 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { cosmosclient } from '@cosmos-client/core'; import { - InlineResponse20052FinalTallyResult, - InlineResponse20052Proposals, + InlineResponse20027FinalTallyResult, + InlineResponse20027Proposals, } from '@cosmos-client/core/esm/openapi'; export interface ProposalContent { @@ -18,10 +18,10 @@ export interface ProposalContent { }) export class ProposalsComponent implements OnInit { @Input() - proposals?: InlineResponse20052Proposals[] | null; + proposals?: InlineResponse20027Proposals[] | null; @Input() - tallies?: (InlineResponse20052FinalTallyResult | undefined)[] | null; + tallies?: (InlineResponse20027FinalTallyResult | undefined)[] | null; @Output() appClickVote: EventEmitter; From ef6d1223492656ed22f286114d63bb0de962dbd1 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Tue, 21 Jun 2022 18:51:13 +0900 Subject: [PATCH 08/77] fix: remove unnecessary types import --- .../src/app/pages/dashboard/dashboard.component.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/projects/explorer/src/app/pages/dashboard/dashboard.component.ts b/projects/explorer/src/app/pages/dashboard/dashboard.component.ts index 8ec8ce28d..3130e5e6d 100644 --- a/projects/explorer/src/app/pages/dashboard/dashboard.component.ts +++ b/projects/explorer/src/app/pages/dashboard/dashboard.component.ts @@ -1,14 +1,7 @@ import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { rest } from '@cosmos-client/core'; -import { pool } from '@cosmos-client/core/cjs/rest/staking/module'; -import { - CosmosMintV1beta1QueryInflationResponse, - InlineResponse20010, - InlineResponse20069, - InlineResponse20070, - QueryTotalSupplyResponseIsTheResponseTypeForTheQueryTotalSupplyRPCMethod, -} from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20010 } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable, of, timer } from 'rxjs'; import { catchError, map, mergeMap } from 'rxjs/operators'; From 8ecc1b1c3c82e10d14281be6280a0404353b7f01 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Tue, 21 Jun 2022 19:27:36 +0900 Subject: [PATCH 09/77] fix: validators data type name from InlineResponse20066Validators to InlineResponse20014Validators from InlineResponse20066Validators to InlineResponse20041Validators from validator.operator_address to validator.address from validator.consensus_pubkey to validator.pub_key --- .../validator/validator.component.ts | 6 +-- .../validators/validators.component.ts | 10 ++-- .../validators/validators.component.ts | 10 ++-- .../validator/validator.component.ts | 6 +-- .../views/validators/validators.component.ts | 10 ++-- .../distribution.application.service.ts | 6 +-- .../cosmos/staking.application.service.ts | 10 ++-- .../validator/validator.component.ts | 4 +- .../validator/validator.component.ts | 7 ++- .../validators/validators.component.ts | 46 ++++++++++--------- .../delegate-form-dialog.component.ts | 17 ++++--- .../delegate-menu-dialog.component.ts | 20 ++++---- .../redelegate-form-dialog.component.ts | 13 +++--- .../undelegate-form-dialog.component.ts | 34 +++++++------- ...-delegator-reward-form-dialog.component.ts | 8 ++-- ...idator-commission-form-dialog.component.ts | 8 ++-- .../validator/validator.component.ts | 6 +-- .../validators/validators.component.ts | 6 +-- .../validator/validator.component.ts | 6 +-- .../validators/validators.component.ts | 13 +++--- .../delegate-form-dialog.component.ts | 8 ++-- .../delegate-menu-dialog.component.ts | 16 +++---- .../redelegate-form-dialog.component.ts | 14 +++--- .../undelegate-form-dialog.component.ts | 10 ++-- ...-delegator-reward-form-dialog.component.ts | 4 +- ...idator-commission-form-dialog.component.ts | 4 +- 26 files changed, 155 insertions(+), 147 deletions(-) diff --git a/projects/explorer/src/app/views/cosmos/staking/validators/validator/validator.component.ts b/projects/explorer/src/app/views/cosmos/staking/validators/validator/validator.component.ts index 81bddb140..6486938b8 100644 --- a/projects/explorer/src/app/views/cosmos/staking/validators/validator/validator.component.ts +++ b/projects/explorer/src/app/views/cosmos/staking/validators/validator/validator.component.ts @@ -1,7 +1,7 @@ import { validatorType } from './../../../../../views/cosmos/staking/validators/validators.component'; import { Component, OnInit, Input } from '@angular/core'; import { cosmosclient } from '@cosmos-client/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @Component({ @@ -20,10 +20,10 @@ export class ValidatorComponent implements OnInit { ngOnInit(): void {} - getColorCode(validator: InlineResponse20066Validators | undefined | null) { + getColorCode(validator: InlineResponse20014Validators | undefined | null) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator?.operator_address ?? '')) + .update(Buffer.from(validator?.address ?? '')) .digest() .toString('hex'); diff --git a/projects/explorer/src/app/views/cosmos/staking/validators/validators.component.ts b/projects/explorer/src/app/views/cosmos/staking/validators/validators.component.ts index 49bc9674c..3880254e0 100644 --- a/projects/explorer/src/app/views/cosmos/staking/validators/validators.component.ts +++ b/projects/explorer/src/app/views/cosmos/staking/validators/validators.component.ts @@ -1,16 +1,16 @@ import { Component, EventEmitter, OnInit, Output, Input } from '@angular/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; export type validatorType = { - val: InlineResponse20066Validators; + val: InlineResponse20014Validators; share: number; inList: boolean; rank: number; }; export type validatorWithShareType = { - val: InlineResponse20066Validators; + val: InlineResponse20014Validators; share: number; }; @@ -36,10 +36,10 @@ export class ValidatorsComponent implements OnInit { }, 5000); } - getColorCode(validator: InlineResponse20066Validators) { + getColorCode(validator: InlineResponse20014Validators) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator.operator_address ?? '')) + .update(Buffer.from(validator.address ?? '')) .digest() .toString('hex'); diff --git a/projects/explorer/src/app/views/dashboard/validators/validators.component.ts b/projects/explorer/src/app/views/dashboard/validators/validators.component.ts index 49bc9674c..3880254e0 100644 --- a/projects/explorer/src/app/views/dashboard/validators/validators.component.ts +++ b/projects/explorer/src/app/views/dashboard/validators/validators.component.ts @@ -1,16 +1,16 @@ import { Component, EventEmitter, OnInit, Output, Input } from '@angular/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; export type validatorType = { - val: InlineResponse20066Validators; + val: InlineResponse20014Validators; share: number; inList: boolean; rank: number; }; export type validatorWithShareType = { - val: InlineResponse20066Validators; + val: InlineResponse20014Validators; share: number; }; @@ -36,10 +36,10 @@ export class ValidatorsComponent implements OnInit { }, 5000); } - getColorCode(validator: InlineResponse20066Validators) { + getColorCode(validator: InlineResponse20014Validators) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator.operator_address ?? '')) + .update(Buffer.from(validator.address ?? '')) .digest() .toString('hex'); diff --git a/projects/explorer/src/app/views/validators/validator/validator.component.ts b/projects/explorer/src/app/views/validators/validator/validator.component.ts index a58b368c4..b9b7489c6 100644 --- a/projects/explorer/src/app/views/validators/validator/validator.component.ts +++ b/projects/explorer/src/app/views/validators/validator/validator.component.ts @@ -1,7 +1,7 @@ import { validatorType } from '../validators.component'; import { Component, OnInit, Input } from '@angular/core'; import { cosmosclient } from '@cosmos-client/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @Component({ @@ -20,10 +20,10 @@ export class ValidatorComponent implements OnInit { ngOnInit(): void {} - getColorCode(validator: InlineResponse20066Validators | undefined | null) { + getColorCode(validator: InlineResponse20014Validators | undefined | null) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator?.operator_address ?? '')) + .update(Buffer.from(validator?.address ?? '')) .digest() .toString('hex'); diff --git a/projects/explorer/src/app/views/validators/validators.component.ts b/projects/explorer/src/app/views/validators/validators.component.ts index 49bc9674c..3880254e0 100644 --- a/projects/explorer/src/app/views/validators/validators.component.ts +++ b/projects/explorer/src/app/views/validators/validators.component.ts @@ -1,16 +1,16 @@ import { Component, EventEmitter, OnInit, Output, Input } from '@angular/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; export type validatorType = { - val: InlineResponse20066Validators; + val: InlineResponse20014Validators; share: number; inList: boolean; rank: number; }; export type validatorWithShareType = { - val: InlineResponse20066Validators; + val: InlineResponse20014Validators; share: number; }; @@ -36,10 +36,10 @@ export class ValidatorsComponent implements OnInit { }, 5000); } - getColorCode(validator: InlineResponse20066Validators) { + getColorCode(validator: InlineResponse20014Validators) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator.operator_address ?? '')) + .update(Buffer.from(validator.address ?? '')) .digest() .toString('hex'); diff --git a/projects/portal/src/app/models/cosmos/distribution.application.service.ts b/projects/portal/src/app/models/cosmos/distribution.application.service.ts index 2b4c351e4..869150771 100644 --- a/projects/portal/src/app/models/cosmos/distribution.application.service.ts +++ b/projects/portal/src/app/models/cosmos/distribution.application.service.ts @@ -12,7 +12,7 @@ import { Router } from '@angular/router'; import { proto } from '@cosmos-client/core'; import { InlineResponse20075, - InlineResponse20066Validators, + InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -31,7 +31,7 @@ export class DistributionApplicationService { ) {} async openWithdrawDelegatorRewardFormDialog( - validator: InlineResponse20066Validators, + validator: InlineResponse20014Validators, ): Promise { const txHash = await this.dialog .open(WithdrawDelegatorRewardFormDialogComponent, { data: validator }) @@ -41,7 +41,7 @@ export class DistributionApplicationService { } async openWithdrawValidatorCommissionFormDialog( - validator: InlineResponse20066Validators, + validator: InlineResponse20014Validators, ): Promise { const txHash = await this.dialog .open(WithdrawValidatorCommissionFormDialogComponent, { data: validator }) diff --git a/projects/portal/src/app/models/cosmos/staking.application.service.ts b/projects/portal/src/app/models/cosmos/staking.application.service.ts index 4ce049a6e..5e00a5114 100644 --- a/projects/portal/src/app/models/cosmos/staking.application.service.ts +++ b/projects/portal/src/app/models/cosmos/staking.application.service.ts @@ -18,7 +18,7 @@ import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; import { proto } from '@cosmos-client/core'; import { - InlineResponse20066Validators, + InlineResponse20014Validators, InlineResponse20075, } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; @@ -48,14 +48,14 @@ export class StakingApplicationService { private readonly walletApplicationService: WalletApplicationService, ) {} - async openDelegateMenuDialog(validator: InlineResponse20066Validators): Promise { + async openDelegateMenuDialog(validator: InlineResponse20014Validators): Promise { await this.dialog .open(DelegateMenuDialogComponent, { data: validator }) .afterClosed() .toPromise(); } - async openDelegateFormDialog(validator: InlineResponse20066Validators): Promise { + async openDelegateFormDialog(validator: InlineResponse20014Validators): Promise { const txHash = await this.dialog .open(DelegateFormDialogComponent, { data: validator }) .afterClosed() @@ -63,7 +63,7 @@ export class StakingApplicationService { await this.router.navigate(['txs', txHash]); } - async openRedelegateFormDialog(validator: InlineResponse20066Validators): Promise { + async openRedelegateFormDialog(validator: InlineResponse20014Validators): Promise { const txHash = await this.dialog .open(RedelegateFormDialogComponent, { data: validator }) .afterClosed() @@ -71,7 +71,7 @@ export class StakingApplicationService { await this.router.navigate(['txs', txHash]); } - async openUndelegateFormDialog(validator: InlineResponse20066Validators): Promise { + async openUndelegateFormDialog(validator: InlineResponse20014Validators): Promise { const txHash = await this.dialog .open(UndelegateFormDialogComponent, { data: validator }) .afterClosed() diff --git a/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts b/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts index 28d9a47be..f6d07cd12 100644 --- a/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts +++ b/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../../../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { cosmosclient, rest } from '@cosmos-client/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import { Observable, of, combineLatest } from 'rxjs'; import { map, mergeMap, catchError } from 'rxjs/operators'; @@ -12,7 +12,7 @@ import { map, mergeMap, catchError } from 'rxjs/operators'; styleUrls: ['./validator.component.css'], }) export class ValidatorComponent implements OnInit { - validator$: Observable; + validator$: Observable; constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { const validatorAddress$ = this.route.params.pipe( diff --git a/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts b/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts index 17154a1a1..e4ae2464a 100644 --- a/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts +++ b/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts @@ -2,10 +2,13 @@ import { CosmosSDKService } from '../../../../models'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { cosmosclient, rest } from '@cosmos-client/core'; -import { InlineResponse20066Validators, QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod } from '@cosmos-client/core/esm/openapi'; +import { + InlineResponse20014Validators, + QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod, +} from '@cosmos-client/core/esm/openapi'; +import { validatorType } from 'projects/portal/src/app/views/delegate/validators/validators.component'; import { Observable, of, combineLatest } from 'rxjs'; import { map, mergeMap, catchError, withLatestFrom } from 'rxjs/operators'; -import { validatorType } from 'projects/portal/src/app/views/delegate/validators/validators.component'; @Component({ selector: 'app-validator', diff --git a/projects/portal/src/app/pages/delegate/validators/validators.component.ts b/projects/portal/src/app/pages/delegate/validators/validators.component.ts index 1d8e769e3..805311bf9 100644 --- a/projects/portal/src/app/pages/delegate/validators/validators.component.ts +++ b/projects/portal/src/app/pages/delegate/validators/validators.component.ts @@ -10,7 +10,8 @@ import { Component, OnInit } from '@angular/core'; import { cosmosclient, rest } from '@cosmos-client/core'; import { InlineResponse20063DelegationResponses, - InlineResponse20066Validators, + InlineResponse20014Validators, + InlineResponse20041Validators, InlineResponse20072, } from '@cosmos-client/core/esm/openapi'; import { of, Observable, BehaviorSubject, combineLatest, zip } from 'rxjs'; @@ -22,13 +23,13 @@ import { filter, map, mergeMap, concatMap, withLatestFrom } from 'rxjs/operators styleUrls: ['./validators.component.css'], }) export class ValidatorsComponent implements OnInit { - validatorsList$: Observable; + validatorsList$: Observable; allValidatorsTokens$: Observable; validatorsWithShare$: Observable; validators$: Observable; currentStoredWallet$: Observable; delegations$: Observable; - delegatedValidators$: Observable<(InlineResponse20066Validators | undefined)[] | undefined>; + delegatedValidators$: Observable<(InlineResponse20041Validators | undefined)[] | undefined>; totalDelegation$: Observable; unbondingDelegations$: Observable<(InlineResponse20072 | undefined)[]>; filteredUnbondingDelegations$: Observable<(InlineResponse20072 | undefined)[]>; @@ -132,42 +133,45 @@ export class ValidatorsComponent implements OnInit { this.unbondingDelegations$ = this.delegatedValidators$.pipe( withLatestFrom(this.cosmosSDK.sdk$, address$), concatMap(([validators, sdk, accAddress]) => { - const valAddressList = validators?.map((validator) => { - if (!validator?.operator_address) return undefined + if (!validator?.operator_address) return undefined; try { - return cosmosclient.ValAddress.fromString(validator?.operator_address) + return cosmosclient.ValAddress.fromString(validator?.operator_address); } catch (error) { console.error(error); return undefined; } - }) - if (!valAddressList) return [] + }); + if (!valAddressList) return []; const unbondingDelegationList = Promise.all( valAddressList.map((valAddress) => { - if (!valAddress) return undefined - return rest.staking.unbondingDelegation(sdk.rest, valAddress, accAddress - ).then(res => res && res.data - ).catch((err) => { - return undefined; - }) - }) - ) - return unbondingDelegationList + if (!valAddress) return undefined; + return rest.staking + .unbondingDelegation(sdk.rest, valAddress, accAddress) + .then((res) => res && res.data) + .catch((err) => { + return undefined; + }); + }), + ); + return unbondingDelegationList; }), - ) + ); this.filteredUnbondingDelegations$ = this.unbondingDelegations$.pipe( - map(unbondingDelegations => unbondingDelegations.filter(unbondingDelegation => unbondingDelegation))) + map((unbondingDelegations) => + unbondingDelegations.filter((unbondingDelegation) => unbondingDelegation), + ), + ); } - ngOnInit() { } + ngOnInit() {} onToggleChange(value: boolean) { this.activeEnabled.next(value); } - onSelectValidator(validator: InlineResponse20066Validators) { + onSelectValidator(validator: InlineResponse20014Validators) { this.stakingAppService.openDelegateMenuDialog(validator); } } diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts index 13f8e6f81..03040a9c6 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts @@ -2,7 +2,10 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi/api'; +import { + InlineResponse20014Validators, + InlineResponse20041Validators, +} from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { StakingApplicationService } from 'projects/portal/src/app/models/cosmos/staking.application.service'; @@ -23,12 +26,12 @@ export class DelegateFormDialogComponent implements OnInit { coins$: Observable; uguuBalance$: Observable | undefined; minimumGasPrices$: Observable; - validatorsList$: Observable; - validator: InlineResponse20066Validators | undefined; + validatorsList$: Observable; + validator: InlineResponse20014Validators | undefined; constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20066Validators, + public readonly data: InlineResponse20014Validators, public matDialogRef: MatDialogRef, private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, @@ -66,12 +69,12 @@ export class DelegateFormDialogComponent implements OnInit { async onSubmit($event: DelegateOnSubmitEvent) { const validatorStatus = $event.validatorList.find( - (val) => val.operator_address == this.validator?.operator_address, + (val) => val.address == this.validator?.address, )?.status; if (validatorStatus != 'BOND_STATUS_BONDED') { const inactiveValidatorResult = await this.dialog .open(InactiveValidatorConfirmDialogComponent, { - data: { valAddress: this.validator?.operator_address!, isConfirmed: false }, + data: { valAddress: this.validator?.address!, isConfirmed: false }, }) .afterClosed() .toPromise(); @@ -84,7 +87,7 @@ export class DelegateFormDialogComponent implements OnInit { let txHash: string | undefined; txHash = await this.stakingAppService.createDelegate( - this.validator?.operator_address!, + this.validator?.address!, $event.amount, $event.minimumGasPrice, $event.gasRatio, diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts index 3dfb12f91..6c000d880 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts @@ -5,7 +5,7 @@ import { Router } from '@angular/router'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; import { InlineResponse20063, - InlineResponse20066Validators, + InlineResponse20014Validators, CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse, InlineResponse20063Delegation, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod, @@ -24,7 +24,7 @@ import { filter, map, mergeMap } from 'rxjs/operators'; styleUrls: ['./delegate-menu-dialog.component.css'], }) export class DelegateMenuDialogComponent implements OnInit { - selectedValidator: InlineResponse20066Validators | undefined; + selectedValidator: InlineResponse20014Validators | undefined; currentStoredWallet$: Observable; delegations$: Observable; delegation$: Observable; @@ -41,7 +41,7 @@ export class DelegateMenuDialogComponent implements OnInit { constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20066Validators, + public readonly data: InlineResponse20014Validators, private router: Router, public matDialogRef: MatDialogRef, private readonly stakingAppService: StakingApplicationService, @@ -140,33 +140,33 @@ export class DelegateMenuDialogComponent implements OnInit { ngOnInit() {} - onSubmitDelegate(validator: InlineResponse20066Validators) { + onSubmitDelegate(validator: InlineResponse20014Validators) { this.matDialogRef.close(); this.stakingAppService.openDelegateFormDialog(validator); } - onSubmitRedelegate(validator: InlineResponse20066Validators) { + onSubmitRedelegate(validator: InlineResponse20014Validators) { this.matDialogRef.close(); this.stakingAppService.openRedelegateFormDialog(validator); } - onSubmitUndelegate(validator: InlineResponse20066Validators) { + onSubmitUndelegate(validator: InlineResponse20014Validators) { this.matDialogRef.close(); this.stakingAppService.openUndelegateFormDialog(validator); } - onSubmitWithdrawDelegatorReward(validator: InlineResponse20066Validators) { + onSubmitWithdrawDelegatorReward(validator: InlineResponse20014Validators) { this.matDialogRef.close(); this.distributionAppService.openWithdrawDelegatorRewardFormDialog(validator); } - onSubmitWithdrawValidatorCommission(validator: InlineResponse20066Validators) { + onSubmitWithdrawValidatorCommission(validator: InlineResponse20014Validators) { this.matDialogRef.close(); this.distributionAppService.openWithdrawValidatorCommissionFormDialog(validator); } - onSubmitDetail(validator: InlineResponse20066Validators) { + onSubmitDetail(validator: InlineResponse20014Validators) { this.matDialogRef.close(); - this.router.navigate(['delegate', 'validators', validator.operator_address]); + this.router.navigate(['delegate', 'validators', validator.address]); } } diff --git a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index 1d138bec1..594968940 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -4,7 +4,8 @@ import { MatSnackBar } from '@angular/material/snack-bar'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; import { InlineResponse20063, - InlineResponse20066Validators, + InlineResponse20014Validators, + InlineResponse20041Validators, } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; @@ -22,18 +23,18 @@ import { filter, map, mergeMap } from 'rxjs/operators'; styleUrls: ['./redelegate-form-dialog.component.css'], }) export class RedelegateFormDialogComponent implements OnInit { - validatorsList$: Observable; + validatorsList$: Observable; currentStoredWallet$: Observable; delegations$: Observable; delegateAmount$: Observable; coins$: Observable; uguuBalance$: Observable | undefined; minimumGasPrices$: Observable; - validator: InlineResponse20066Validators | undefined; + validator: InlineResponse20014Validators | undefined; constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20066Validators, + public readonly data: InlineResponse20014Validators, public matDialogRef: MatDialogRef, private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, @@ -85,7 +86,7 @@ export class RedelegateFormDialogComponent implements OnInit { async onSubmit($event: RedelegateOnSubmitEvent) { const validatorStatus = $event.validatorList.find( - (val) => val.operator_address == $event.destinationValidator, + (val) => val.address == $event.destinationValidator, )?.status; if (validatorStatus != 'BOND_STATUS_BONDED') { const inactiveValidatorResult = await this.dialog @@ -102,7 +103,7 @@ export class RedelegateFormDialogComponent implements OnInit { } const txHash = await this.stakingAppService.Redelegate( - this.validator?.operator_address!, + this.validator?.address!, $event.destinationValidator, $event.amount, $event.minimumGasPrice, diff --git a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts index cdb1b3726..40cf35a9f 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts @@ -4,7 +4,7 @@ import { cosmosclient, proto, rest } from '@cosmos-client/core'; import { InlineResponse20063, InlineResponse20072, - InlineResponse20066Validators, + InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; @@ -27,12 +27,12 @@ export class UndelegateFormDialogComponent implements OnInit { coins$: Observable; uguuBalance$: Observable | undefined; minimumGasPrices$: Observable; - validator: InlineResponse20066Validators | undefined; + validator: InlineResponse20014Validators | undefined; unbondingDelegation$: Observable; constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20066Validators, + public readonly data: InlineResponse20014Validators, public matDialogRef: MatDialogRef, private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, @@ -51,28 +51,26 @@ export class UndelegateFormDialogComponent implements OnInit { ); this.unbondingDelegation$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( mergeMap(([sdk, address]) => { - const valAddressString = this.validator?.operator_address; + const valAddressString = this.validator?.address; if (!valAddressString) { - return of(undefined) + return of(undefined); } const valAddress = cosmosclient.ValAddress.fromString(valAddressString); - const unbondingDelegation = rest.staking.unbondingDelegation( - sdk.rest, - valAddress, - address, - ).then(res => res.data - ).catch((error) => { - console.error(error.message); return undefined - }) - return unbondingDelegation + const unbondingDelegation = rest.staking + .unbondingDelegation(sdk.rest, valAddress, address) + .then((res) => res.data) + .catch((error) => { + console.error(error.message); + return undefined; + }); + return unbondingDelegation; }), ); this.delegateAmount$ = this.delegations$.pipe( map( (delegations) => delegations.delegation_responses?.find( - (response) => - response.delegation?.validator_address == this.validator?.operator_address, + (response) => response.delegation?.validator_address == this.validator?.address, )?.balance, ), ); @@ -91,11 +89,11 @@ export class UndelegateFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} async onSubmit($event: UndelegateOnSubmitEvent) { const txHash = await this.stakingAppService.undelegate( - this.validator?.operator_address!, + this.validator?.address!, $event.amount, $event.minimumGasPrice, $event.gasRatio, diff --git a/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts index 57c1eedcf..d1b6b1f83 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi/api'; +import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { DistributionApplicationService } from 'projects/portal/src/app/models/cosmos/distribution.application.service'; @@ -19,11 +19,11 @@ import { map } from 'rxjs/operators'; export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { currentStoredWallet$: Observable; minimumGasPrices$: Observable; - validator: InlineResponse20066Validators | undefined; + validator: InlineResponse20014Validators | undefined; constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20066Validators, + public readonly data: InlineResponse20014Validators, public matDialogRef: MatDialogRef, private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, @@ -39,7 +39,7 @@ export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { async onSubmit($event: WithdrawDelegatorRewardOnSubmitEvent) { const txHash = await this.distributionAppService.withdrawDelegatorReward( - this.validator?.operator_address!, + this.validator?.address!, $event.minimumGasPrice, $event.gasRatio, ); diff --git a/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts index d38545cad..01d30c5ca 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi/api'; +import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { DistributionApplicationService } from 'projects/portal/src/app/models/cosmos/distribution.application.service'; @@ -19,11 +19,11 @@ import { map } from 'rxjs/operators'; export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { currentStoredWallet$: Observable; minimumGasPrices$: Observable; - validator: InlineResponse20066Validators | undefined; + validator: InlineResponse20014Validators | undefined; constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20066Validators, + public readonly data: InlineResponse20014Validators, public matDialogRef: MatDialogRef, private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, @@ -39,7 +39,7 @@ export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { async onSubmit($event: WithdrawValidatorCommissionOnSubmitEvent) { const txHash = await this.distributionAppService.withdrawValidatorCommission( - this.validator?.operator_address!, + this.validator?.address!, $event.minimumGasPrice, $event.gasRatio, ); diff --git a/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts b/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts index aa5681ff4..991aa11f3 100644 --- a/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts +++ b/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input, OnChanges } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-validator', @@ -9,7 +9,7 @@ import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi'; }) export class ValidatorComponent implements OnInit, OnChanges { @Input() - validator?: InlineResponse20066Validators | null; + validator?: InlineResponse20014Validators | null; publicKey?: string; @@ -19,7 +19,7 @@ export class ValidatorComponent implements OnInit, OnChanges { ngOnChanges() { const pubKey = cosmosclient.codec.protoJSONToInstance( - cosmosclient.codec.castProtoJSONOfProtoAny(this.validator?.consensus_pubkey), + cosmosclient.codec.castProtoJSONOfProtoAny(this.validator?.pub_key), ); if (!(pubKey instanceof proto.cosmos.crypto.ed25519.PubKey)) { diff --git a/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts b/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts index 40712fb54..dbcc23622 100644 --- a/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts +++ b/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input } from '@angular/core'; import { - InlineResponse20066Validators, + InlineResponse20014Validators, QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @@ -22,10 +22,10 @@ export class ValidatorsComponent implements OnInit { }, 5000); } - getColorCode(validator: InlineResponse20066Validators) { + getColorCode(validator: InlineResponse20014Validators) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator.operator_address ?? '')) + .update(Buffer.from(validator.address ?? '')) .digest() .toString('hex'); diff --git a/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts b/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts index 6d22c6aba..0d3c45f45 100644 --- a/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts +++ b/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts @@ -1,7 +1,7 @@ import { validatorType } from '../validators.component'; import { Component, OnInit, Input, OnChanges } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @Component({ @@ -20,10 +20,10 @@ export class ValidatorComponent implements OnInit { ngOnInit(): void {} - getColorCode(validator: InlineResponse20066Validators | undefined | null) { + getColorCode(validator: InlineResponse20014Validators | undefined | null) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator?.operator_address ?? '')) + .update(Buffer.from(validator?.address ?? '')) .digest() .toString('hex'); diff --git a/projects/portal/src/app/views/delegate/validators/validators.component.ts b/projects/portal/src/app/views/delegate/validators/validators.component.ts index 0f1e7d660..e1fc396b6 100644 --- a/projects/portal/src/app/views/delegate/validators/validators.component.ts +++ b/projects/portal/src/app/views/delegate/validators/validators.component.ts @@ -2,20 +2,20 @@ import { StoredWallet } from '../../../models/wallets/wallet.model'; import { Component, EventEmitter, OnInit, Output, Input } from '@angular/core'; import { InlineResponse20063DelegationResponses, - InlineResponse20066Validators, + InlineResponse20014Validators, InlineResponse20072, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; export type validatorType = { - val: InlineResponse20066Validators; + val: InlineResponse20014Validators; share: number; inList: boolean; rank: number; }; export type validatorWithShareType = { - val: InlineResponse20066Validators; + val: InlineResponse20014Validators; share: number; }; @@ -32,7 +32,7 @@ export class ValidatorsComponent implements OnInit { @Input() delegations?: InlineResponse20063DelegationResponses[] | null; @Input() - delegatedValidators?: (InlineResponse20066Validators | undefined)[] | null; + delegatedValidators?: (InlineResponse20014Validators | undefined)[] | null; @Input() unbondingDelegations?: (InlineResponse20072 | undefined)[] | null; @@ -40,7 +40,7 @@ export class ValidatorsComponent implements OnInit { toggleActiveChange: EventEmitter; @Output() - appClickValidator: EventEmitter; + appClickValidator: EventEmitter; constructor() { this.toggleActiveChange = new EventEmitter(); @@ -52,7 +52,6 @@ export class ValidatorsComponent implements OnInit { console.log('validators', this.validators); console.log('unbonding', this.unbondingDelegations); }, 5000); - } getColorCode(valAddress: string) { @@ -78,7 +77,7 @@ export class ValidatorsComponent implements OnInit { } } - onClickValidator(validator: InlineResponse20066Validators) { + onClickValidator(validator: InlineResponse20014Validators) { this.appClickValidator.emit(validator); } } diff --git a/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts index 6ec38984d..4194edfba 100644 --- a/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20066Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet, WalletType } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -8,7 +8,7 @@ export type DelegateOnSubmitEvent = { walletType: WalletType; amount: proto.cosmos.base.v1beta1.ICoin; minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - validatorList: InlineResponse20066Validators[]; + validatorList: InlineResponse20014Validators[]; gasRatio: number; }; @@ -21,7 +21,7 @@ export class DelegateFormDialogComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() - validatorsList?: InlineResponse20066Validators[] | null; + validatorsList?: InlineResponse20014Validators[] | null; @Input() coins?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() @@ -29,7 +29,7 @@ export class DelegateFormDialogComponent implements OnInit { @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - validator?: InlineResponse20066Validators | null; + validator?: InlineResponse20014Validators | null; @Output() appSubmit: EventEmitter; diff --git a/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts index ca7f14593..27994b44c 100644 --- a/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { InlineResponse20063, - InlineResponse20066Validators, + InlineResponse20014Validators, CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod, } from '@cosmos-client/core/esm/openapi/api'; @@ -16,7 +16,7 @@ import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.mode }) export class DelegateMenuDialogComponent implements OnInit { @Input() - selectedValidator?: InlineResponse20066Validators | null; + selectedValidator?: InlineResponse20014Validators | null; @Input() currentStoredWallet?: StoredWallet | null; @Input() @@ -32,17 +32,17 @@ export class DelegateMenuDialogComponent implements OnInit { @Input() isValidator?: boolean | null; @Output() - appDelegate: EventEmitter; + appDelegate: EventEmitter; @Output() - appRedelegate: EventEmitter; + appRedelegate: EventEmitter; @Output() - appUndelegate: EventEmitter; + appUndelegate: EventEmitter; @Output() - appWithdrawDelegatorReward: EventEmitter; + appWithdrawDelegatorReward: EventEmitter; @Output() - appWithdrawValidatorCommission: EventEmitter; + appWithdrawValidatorCommission: EventEmitter; @Output() - appDetail: EventEmitter; + appDetail: EventEmitter; constructor() { this.appDelegate = new EventEmitter(); diff --git a/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index 68384c605..e716f859d 100644 --- a/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { InlineResponse20063, - InlineResponse20066Validators, + InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -11,7 +11,7 @@ export type RedelegateOnSubmitEvent = { destinationValidator: string; amount: proto.cosmos.base.v1beta1.ICoin; minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - validatorList: InlineResponse20066Validators[]; + validatorList: InlineResponse20014Validators[]; gasRatio: number; }; @@ -22,7 +22,7 @@ export type RedelegateOnSubmitEvent = { }) export class RedelegateFormDialogComponent implements OnInit { @Input() - validatorsList?: InlineResponse20066Validators[] | null; + validatorsList?: InlineResponse20014Validators[] | null; @Input() currentStoredWallet?: StoredWallet | null; @Input() @@ -36,7 +36,7 @@ export class RedelegateFormDialogComponent implements OnInit { @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - validator?: InlineResponse20066Validators | null; + validator?: InlineResponse20014Validators | null; @Output() appSubmit: EventEmitter; @@ -44,7 +44,7 @@ export class RedelegateFormDialogComponent implements OnInit { selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; availableDenoms?: string[]; selectedAmount?: proto.cosmos.base.v1beta1.ICoin; - selectedValidator?: InlineResponse20066Validators; + selectedValidator?: InlineResponse20014Validators; gasRatio: number; constructor() { @@ -79,7 +79,7 @@ export class RedelegateFormDialogComponent implements OnInit { } onSubmit(minimumGasPrice: string) { - if (!this.selectedValidator || !this.selectedValidator.operator_address) { + if (!this.selectedValidator || !this.selectedValidator.address) { return; } if (!this.selectedAmount) { @@ -93,7 +93,7 @@ export class RedelegateFormDialogComponent implements OnInit { } this.selectedAmount.amount = this.selectedAmount.amount?.toString(); this.appSubmit.emit({ - destinationValidator: this.selectedValidator.operator_address, + destinationValidator: this.selectedValidator.address, amount: this.selectedAmount, minimumGasPrice: this.selectedGasPrice, validatorList: this.validatorsList, diff --git a/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts index aaea30983..cbbadab91 100644 --- a/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts @@ -3,7 +3,7 @@ import { proto } from '@cosmos-client/core'; import { InlineResponse20063, InlineResponse20072, - InlineResponse20066Validators, + InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -35,7 +35,7 @@ export class UndelegateFormDialogComponent implements OnInit { @Input() unbondingDelegation?: InlineResponse20072 | null; @Input() - validator?: InlineResponse20066Validators | null; + validator?: InlineResponse20014Validators | null; @Output() appSubmit: EventEmitter; @@ -45,7 +45,7 @@ export class UndelegateFormDialogComponent implements OnInit { selectedAmount?: proto.cosmos.base.v1beta1.ICoin; gasRatio: number; - estimatedUnbondingData: string = "" + estimatedUnbondingData: string = ''; now = new Date(); constructor() { @@ -55,7 +55,7 @@ export class UndelegateFormDialogComponent implements OnInit { this.selectedAmount = { denom: 'uguu', amount: '0' }; this.gasRatio = 0; this.now.setDate(this.now.getDate() + 14); - this.estimatedUnbondingData = this.now.toString() + this.estimatedUnbondingData = this.now.toString(); } ngOnChanges(): void { @@ -64,7 +64,7 @@ export class UndelegateFormDialogComponent implements OnInit { } } - ngOnInit(): void { } + ngOnInit(): void {} getColorCode(address: string) { const hash = crypto diff --git a/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts index 16069fdd0..67afd5387 100644 --- a/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { InlineResponse20063, - InlineResponse20066Validators, + InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -23,7 +23,7 @@ export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - validator?: InlineResponse20066Validators | null; + validator?: InlineResponse20014Validators | null; @Output() appSubmit: EventEmitter; diff --git a/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts index 934e1e217..275303c9e 100644 --- a/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { InlineResponse20063, - InlineResponse20066Validators, + InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -23,7 +23,7 @@ export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - validator?: InlineResponse20066Validators | null; + validator?: InlineResponse20014Validators | null; @Output() appSubmit: EventEmitter; From 8b3d63de1ddaf9364ff74ead7c33ed009bac447f Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Tue, 21 Jun 2022 19:57:42 +0900 Subject: [PATCH 10/77] fix: errors on explorer --- .../dashboard/validators/validators.component.ts | 11 ++++++----- .../dashboard/validators/validators.component.ts | 10 +++++----- .../views/validators/validator/validator.component.ts | 6 +++--- .../src/app/views/validators/validators.component.ts | 10 +++++----- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/projects/explorer/src/app/pages/dashboard/validators/validators.component.ts b/projects/explorer/src/app/pages/dashboard/validators/validators.component.ts index c9a960bc9..f83599f19 100644 --- a/projects/explorer/src/app/pages/dashboard/validators/validators.component.ts +++ b/projects/explorer/src/app/pages/dashboard/validators/validators.component.ts @@ -43,11 +43,12 @@ export class ValidatorsComponent implements OnInit { return []; } // calculate validator share - const validatorsWithShare = validators.validators?.map((validator) => { - const val = validator; - const share = Number(validator.tokens) / allTokens; - return { val, share }; - }); + const validatorsWithShare: validatorWithShareType[] | undefined = + validators.validators?.map((validator) => { + const val = validator; + const share = Number(validator.tokens) / allTokens; + return { val, share }; + }); // sort by share const validatorsWithSort = validatorsWithShare?.sort((x, y) => y.share - x.share); diff --git a/projects/explorer/src/app/views/dashboard/validators/validators.component.ts b/projects/explorer/src/app/views/dashboard/validators/validators.component.ts index 3880254e0..300aa11e8 100644 --- a/projects/explorer/src/app/views/dashboard/validators/validators.component.ts +++ b/projects/explorer/src/app/views/dashboard/validators/validators.component.ts @@ -1,16 +1,16 @@ import { Component, EventEmitter, OnInit, Output, Input } from '@angular/core'; -import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; export type validatorType = { - val: InlineResponse20014Validators; + val: InlineResponse20041Validators; share: number; inList: boolean; rank: number; }; export type validatorWithShareType = { - val: InlineResponse20014Validators; + val: InlineResponse20041Validators; share: number; }; @@ -36,10 +36,10 @@ export class ValidatorsComponent implements OnInit { }, 5000); } - getColorCode(validator: InlineResponse20014Validators) { + getColorCode(validator: InlineResponse20041Validators) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator.address ?? '')) + .update(Buffer.from(validator.operator_address ?? '')) .digest() .toString('hex'); diff --git a/projects/explorer/src/app/views/validators/validator/validator.component.ts b/projects/explorer/src/app/views/validators/validator/validator.component.ts index b9b7489c6..2e6f8ca35 100644 --- a/projects/explorer/src/app/views/validators/validator/validator.component.ts +++ b/projects/explorer/src/app/views/validators/validator/validator.component.ts @@ -1,7 +1,7 @@ import { validatorType } from '../validators.component'; import { Component, OnInit, Input } from '@angular/core'; import { cosmosclient } from '@cosmos-client/core'; -import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @Component({ @@ -20,10 +20,10 @@ export class ValidatorComponent implements OnInit { ngOnInit(): void {} - getColorCode(validator: InlineResponse20014Validators | undefined | null) { + getColorCode(validator: InlineResponse20041Validators | undefined | null) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator?.address ?? '')) + .update(Buffer.from(validator?.operator_address ?? '')) .digest() .toString('hex'); diff --git a/projects/explorer/src/app/views/validators/validators.component.ts b/projects/explorer/src/app/views/validators/validators.component.ts index 3880254e0..300aa11e8 100644 --- a/projects/explorer/src/app/views/validators/validators.component.ts +++ b/projects/explorer/src/app/views/validators/validators.component.ts @@ -1,16 +1,16 @@ import { Component, EventEmitter, OnInit, Output, Input } from '@angular/core'; -import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; export type validatorType = { - val: InlineResponse20014Validators; + val: InlineResponse20041Validators; share: number; inList: boolean; rank: number; }; export type validatorWithShareType = { - val: InlineResponse20014Validators; + val: InlineResponse20041Validators; share: number; }; @@ -36,10 +36,10 @@ export class ValidatorsComponent implements OnInit { }, 5000); } - getColorCode(validator: InlineResponse20014Validators) { + getColorCode(validator: InlineResponse20041Validators) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator.address ?? '')) + .update(Buffer.from(validator.operator_address ?? '')) .digest() .toString('hex'); From bd3a885349ac112d915f9896e44d7ed54424b1cb Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Wed, 22 Jun 2022 10:29:44 +0900 Subject: [PATCH 11/77] fix: validator related errors --- .../validators/validator/validator.component.ts | 6 +++--- .../delegate/validators/validators.component.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts b/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts index 991aa11f3..ef59d7ae7 100644 --- a/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts +++ b/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input, OnChanges } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-validator', @@ -9,7 +9,7 @@ import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; }) export class ValidatorComponent implements OnInit, OnChanges { @Input() - validator?: InlineResponse20014Validators | null; + validator?: InlineResponse20041Validators | null; publicKey?: string; @@ -19,7 +19,7 @@ export class ValidatorComponent implements OnInit, OnChanges { ngOnChanges() { const pubKey = cosmosclient.codec.protoJSONToInstance( - cosmosclient.codec.castProtoJSONOfProtoAny(this.validator?.pub_key), + cosmosclient.codec.castProtoJSONOfProtoAny(this.validator?.consensus_pubkey), ); if (!(pubKey instanceof proto.cosmos.crypto.ed25519.PubKey)) { diff --git a/projects/portal/src/app/views/delegate/validators/validators.component.ts b/projects/portal/src/app/views/delegate/validators/validators.component.ts index e1fc396b6..446aee4c6 100644 --- a/projects/portal/src/app/views/delegate/validators/validators.component.ts +++ b/projects/portal/src/app/views/delegate/validators/validators.component.ts @@ -2,20 +2,20 @@ import { StoredWallet } from '../../../models/wallets/wallet.model'; import { Component, EventEmitter, OnInit, Output, Input } from '@angular/core'; import { InlineResponse20063DelegationResponses, - InlineResponse20014Validators, + InlineResponse20041Validators, InlineResponse20072, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; export type validatorType = { - val: InlineResponse20014Validators; + val: InlineResponse20041Validators; share: number; inList: boolean; rank: number; }; export type validatorWithShareType = { - val: InlineResponse20014Validators; + val: InlineResponse20041Validators; share: number; }; @@ -32,7 +32,7 @@ export class ValidatorsComponent implements OnInit { @Input() delegations?: InlineResponse20063DelegationResponses[] | null; @Input() - delegatedValidators?: (InlineResponse20014Validators | undefined)[] | null; + delegatedValidators?: (InlineResponse20041Validators | undefined)[] | null; @Input() unbondingDelegations?: (InlineResponse20072 | undefined)[] | null; @@ -40,7 +40,7 @@ export class ValidatorsComponent implements OnInit { toggleActiveChange: EventEmitter; @Output() - appClickValidator: EventEmitter; + appClickValidator: EventEmitter; constructor() { this.toggleActiveChange = new EventEmitter(); @@ -77,7 +77,7 @@ export class ValidatorsComponent implements OnInit { } } - onClickValidator(validator: InlineResponse20014Validators) { + onClickValidator(validator: InlineResponse20041Validators) { this.appClickValidator.emit(validator); } } From 0107ee32e343782390463241af01048751b746cb Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Wed, 22 Jun 2022 10:36:26 +0900 Subject: [PATCH 12/77] fix: rewards related data type from InlineResponse20047 to InlineResponse20022 --- .../account/distribution/distribution.component.ts | 4 ++-- .../account/distribution/distribution.component.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts b/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts index 43febdc9c..11f71cec1 100644 --- a/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts +++ b/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts @@ -4,7 +4,7 @@ import { ActivatedRoute } from '@angular/router'; import { cosmosclient, rest } from '@cosmos-client/core'; import { CosmosDistributionV1beta1QueryValidatorSlashesResponse, - InlineResponse20047, + InlineResponse20022, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod, } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; @@ -21,7 +21,7 @@ export class DistributionComponent implements OnInit { | QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod | undefined >; - rewards$: Observable; + rewards$: Observable; slashes$: Observable; constructor( diff --git a/projects/portal/src/app/views/accounts/account/distribution/distribution.component.ts b/projects/portal/src/app/views/accounts/account/distribution/distribution.component.ts index 3f41e1fc0..7cde5d522 100644 --- a/projects/portal/src/app/views/accounts/account/distribution/distribution.component.ts +++ b/projects/portal/src/app/views/accounts/account/distribution/distribution.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { CosmosDistributionV1beta1QueryValidatorSlashesResponse, - InlineResponse20047, + InlineResponse20022, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod, } from '@cosmos-client/core/esm/openapi/api'; @@ -14,11 +14,11 @@ export class DistributionComponent implements OnInit { @Input() commission?: QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod | null; @Input() - rewards?: InlineResponse20047 | null; + rewards?: InlineResponse20022 | null; @Input() slashes?: CosmosDistributionV1beta1QueryValidatorSlashesResponse | null; - constructor() { } + constructor() {} - ngOnInit(): void { } + ngOnInit(): void {} } From 0772200ee786baab41a79a35c008795fa267e80b Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Wed, 22 Jun 2022 10:43:36 +0900 Subject: [PATCH 13/77] fix: tx response data type name from InlineResponse20075 to InlineResponse20050 --- .../app/models/cosmos/tx-common.service.ts | 4 ++-- .../auctions/auction.application.service.ts | 4 ++-- .../auction.infrastructure.service.ts | 4 ++-- .../app/models/auctions/auction.service.ts | 6 ++--- .../models/cdps/cdp.application.service.ts | 12 +++++----- .../models/cdps/cdp.infrastructure.service.ts | 12 +++++----- .../portal/src/app/models/cdps/cdp.service.ts | 22 +++++++++---------- .../src/app/models/cosmos/bank.service.ts | 4 ++-- .../distribution.application.service.ts | 6 ++--- .../app/models/cosmos/distribution.service.ts | 6 ++--- .../models/cosmos/gov.application.service.ts | 8 +++---- .../src/app/models/cosmos/gov.service.ts | 8 +++---- .../cosmos/slashing.application.service.ts | 4 ++-- .../src/app/models/cosmos/slashing.service.ts | 4 ++-- .../cosmos/staking.application.service.ts | 10 ++++----- .../src/app/models/cosmos/staking.service.ts | 12 +++++----- .../app/models/cosmos/tx-common.service.ts | 4 ++-- .../cosmos/tx/common/tx-common.service.ts | 4 ++-- .../tx/nft/nft-tx.application.service.ts | 4 ++-- .../tx/nft/nft-tx.infrastructure.service.ts | 4 ++-- .../models/ununifi/tx/nft/nft-tx.service.ts | 6 ++--- 21 files changed, 74 insertions(+), 74 deletions(-) diff --git a/projects/explorer/src/app/models/cosmos/tx-common.service.ts b/projects/explorer/src/app/models/cosmos/tx-common.service.ts index 14fdb15bb..bd95381a2 100644 --- a/projects/explorer/src/app/models/cosmos/tx-common.service.ts +++ b/projects/explorer/src/app/models/cosmos/tx-common.service.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../cosmos-sdk.service'; import { SimulatedTxResultResponse } from './tx-common.model'; import { Injectable } from '@angular/core'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; @Injectable({ providedIn: 'root', @@ -62,7 +62,7 @@ export class TxCommonService { }; } - async announceTx(txBuilder: cosmosclient.TxBuilder): Promise { + async announceTx(txBuilder: cosmosclient.TxBuilder): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); // broadcast tx diff --git a/projects/portal/src/app/models/auctions/auction.application.service.ts b/projects/portal/src/app/models/auctions/auction.application.service.ts index b1fafb865..423392fa9 100644 --- a/projects/portal/src/app/models/auctions/auction.application.service.ts +++ b/projects/portal/src/app/models/auctions/auction.application.service.ts @@ -7,7 +7,7 @@ import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -89,7 +89,7 @@ export class AuctionApplicationService { let txhash: string | undefined; try { - const res: InlineResponse20075 = await this.auction.placeBid( + const res: InlineResponse20050 = await this.auction.placeBid( auctionID, amount, currentCosmosWallet, diff --git a/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts b/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts index 0fd9da89b..efef888b1 100644 --- a/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts +++ b/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts @@ -4,7 +4,7 @@ import { CosmosWallet } from '../wallets/wallet.model'; import { IAuctionInfrastructure } from './auction.service'; import { Injectable } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; import { ununifi } from 'ununifi-client'; @@ -21,7 +21,7 @@ export class AuctionInfrastructureService implements IAuctionInfrastructure { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildPlaceBidTxBuilder( auctionID, diff --git a/projects/portal/src/app/models/auctions/auction.service.ts b/projects/portal/src/app/models/auctions/auction.service.ts index 017f0a783..e1a67ebac 100644 --- a/projects/portal/src/app/models/auctions/auction.service.ts +++ b/projects/portal/src/app/models/auctions/auction.service.ts @@ -3,7 +3,7 @@ import { CosmosWallet } from '../wallets/wallet.model'; import { AuctionInfrastructureService } from './auction.infrastructure.service'; import { Injectable } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; export interface IAuctionInfrastructure { placeBid( @@ -12,7 +12,7 @@ export interface IAuctionInfrastructure { currentCosmosWallet: CosmosWallet, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise; + ): Promise; simulateToPlaceBid( auction_id: number, @@ -38,7 +38,7 @@ export class AuctionService { currentCosmosWallet: CosmosWallet, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { return this.iAuctionInfrastructure.placeBid(auctionID, amount, currentCosmosWallet, gas, fee); } diff --git a/projects/portal/src/app/models/cdps/cdp.application.service.ts b/projects/portal/src/app/models/cdps/cdp.application.service.ts index 47a5c5285..8103363ba 100644 --- a/projects/portal/src/app/models/cdps/cdp.application.service.ts +++ b/projects/portal/src/app/models/cdps/cdp.application.service.ts @@ -8,7 +8,7 @@ import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; @Injectable({ @@ -111,7 +111,7 @@ export class CdpApplicationService { let txhash: string | undefined; try { - const res: InlineResponse20075 = await this.cdp.createCDP( + const res: InlineResponse20050 = await this.cdp.createCDP( key, privateKey, collateralType, @@ -226,7 +226,7 @@ export class CdpApplicationService { let txhash: string | undefined; try { - const res: InlineResponse20075 = await this.cdp.drawCDP( + const res: InlineResponse20050 = await this.cdp.drawCDP( key, privateKey, collateralType, @@ -339,7 +339,7 @@ export class CdpApplicationService { let txhash: string | undefined; try { - const res: InlineResponse20075 = await this.cdp.repayCDP( + const res: InlineResponse20050 = await this.cdp.repayCDP( key, privateKey, collateralType, @@ -455,7 +455,7 @@ export class CdpApplicationService { let txhash: string | undefined; try { - const res: InlineResponse20075 = await this.cdp.depositCDP( + const res: InlineResponse20050 = await this.cdp.depositCDP( key, privateKey, ownerAddr, @@ -572,7 +572,7 @@ export class CdpApplicationService { let txhash: string | undefined; try { - const res: InlineResponse20075 = await this.cdp.withdrawCDP( + const res: InlineResponse20050 = await this.cdp.withdrawCDP( key, privateKey, ownerAddr, diff --git a/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts b/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts index ad713f52e..26715245a 100644 --- a/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts +++ b/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts @@ -6,7 +6,7 @@ import { KeyService } from '../keys/key.service'; import { ICdpInfrastructure } from './cdp.service'; import { Injectable } from '@angular/core'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { ununifi } from 'ununifi-client'; @@ -29,7 +29,7 @@ export class CdpInfrastructureService implements ICdpInfrastructure { principal: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { const txBuilder = await this.buildCreateCDPTx( key, privateKey, @@ -145,7 +145,7 @@ export class CdpInfrastructureService implements ICdpInfrastructure { principal: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { const txBuilder = await this.buildDrawCDPTx( key, privateKey, @@ -255,7 +255,7 @@ export class CdpInfrastructureService implements ICdpInfrastructure { repayment: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { const txBuilder = await this.buildRepayCDPTx( key, privateKey, @@ -366,7 +366,7 @@ export class CdpInfrastructureService implements ICdpInfrastructure { collateral: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { const txBUilder = await this.buildDepositCDPTx( key, privateKey, @@ -483,7 +483,7 @@ export class CdpInfrastructureService implements ICdpInfrastructure { collateral: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { const txBuilder = await this.buildWithdrawCDPTx( key, privateKey, diff --git a/projects/portal/src/app/models/cdps/cdp.service.ts b/projects/portal/src/app/models/cdps/cdp.service.ts index 336c1796a..75b95720c 100644 --- a/projects/portal/src/app/models/cdps/cdp.service.ts +++ b/projects/portal/src/app/models/cdps/cdp.service.ts @@ -3,7 +3,7 @@ import { Key } from '../keys/key.model'; import { CdpInfrastructureService } from './cdp.infrastructure.service'; import { Injectable } from '@angular/core'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; export interface ICdpInfrastructure { createCDP( @@ -14,7 +14,7 @@ export interface ICdpInfrastructure { principal: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise; + ): Promise; simulateToCreateCDP( key: Key, @@ -33,7 +33,7 @@ export interface ICdpInfrastructure { principal: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise; + ): Promise; simulateToDrawCDP( key: Key, @@ -51,7 +51,7 @@ export interface ICdpInfrastructure { repayment: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise; + ): Promise; simulateToRepayCDP( key: Key, @@ -70,7 +70,7 @@ export interface ICdpInfrastructure { collateral: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise; + ): Promise; simulateToDepositCDP( key: Key, @@ -90,7 +90,7 @@ export interface ICdpInfrastructure { collateral: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise; + ): Promise; simulateToWithdrawCDP( key: Key, @@ -120,7 +120,7 @@ export class CdpService { principal: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { return this.iCdpInfrastructure.createCDP( key, privateKey, @@ -159,7 +159,7 @@ export class CdpService { principal: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { return this.iCdpInfrastructure.drawCDP(key, privateKey, collateralType, principal, gas, fee); } @@ -188,7 +188,7 @@ export class CdpService { repayment: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { return this.iCdpInfrastructure.repayCDP(key, privateKey, collateralType, repayment, gas, fee); } @@ -218,7 +218,7 @@ export class CdpService { collateral: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { return this.iCdpInfrastructure.depositCDP( key, privateKey, @@ -258,7 +258,7 @@ export class CdpService { collateral: proto.cosmos.base.v1beta1.ICoin, gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, - ): Promise { + ): Promise { return this.iCdpInfrastructure.withdrawCDP( key, privateKey, diff --git a/projects/portal/src/app/models/cosmos/bank.service.ts b/projects/portal/src/app/models/cosmos/bank.service.ts index 089251e44..94b876d5e 100644 --- a/projects/portal/src/app/models/cosmos/bank.service.ts +++ b/projects/portal/src/app/models/cosmos/bank.service.ts @@ -4,7 +4,7 @@ import { SimulatedTxResultResponse } from './tx-common.model'; import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; @Injectable({ providedIn: 'root', @@ -50,7 +50,7 @@ export class BankService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildSendTxBuilder( diff --git a/projects/portal/src/app/models/cosmos/distribution.application.service.ts b/projects/portal/src/app/models/cosmos/distribution.application.service.ts index 869150771..adce6c86c 100644 --- a/projects/portal/src/app/models/cosmos/distribution.application.service.ts +++ b/projects/portal/src/app/models/cosmos/distribution.application.service.ts @@ -11,7 +11,7 @@ import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; import { proto } from '@cosmos-client/core'; import { - InlineResponse20075, + InlineResponse20050, InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; @@ -112,7 +112,7 @@ export class DistributionApplicationService { // send tx const dialogRef = this.loadingDialog.open('Sending'); - let txResult: InlineResponse20075 | undefined; + let txResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { @@ -202,7 +202,7 @@ export class DistributionApplicationService { // send tx const dialogRef = this.loadingDialog.open('Sending'); - let txResult: InlineResponse20075 | undefined; + let txResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { diff --git a/projects/portal/src/app/models/cosmos/distribution.service.ts b/projects/portal/src/app/models/cosmos/distribution.service.ts index a883bbc47..1ff136b5b 100644 --- a/projects/portal/src/app/models/cosmos/distribution.service.ts +++ b/projects/portal/src/app/models/cosmos/distribution.service.ts @@ -5,7 +5,7 @@ import { SimulatedTxResultResponse } from './tx-common.model'; import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; import { cosmosclient, rest, proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; @Injectable({ providedIn: 'root', @@ -24,7 +24,7 @@ export class DistributionService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildWithdrawDelegatorRewardTxBuilder( validatorAddress, @@ -117,7 +117,7 @@ export class DistributionService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildWithdrawValidatorCommissionTxBuilder( validatorAddress, diff --git a/projects/portal/src/app/models/cosmos/gov.application.service.ts b/projects/portal/src/app/models/cosmos/gov.application.service.ts index 357dd644d..6fc57f68e 100644 --- a/projects/portal/src/app/models/cosmos/gov.application.service.ts +++ b/projects/portal/src/app/models/cosmos/gov.application.service.ts @@ -12,7 +12,7 @@ import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -105,7 +105,7 @@ export class GovApplicationService { const dialogRef = this.loadingDialog.open('Loading...'); - let submitProposalResult: InlineResponse20075 | undefined; + let submitProposalResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { @@ -197,7 +197,7 @@ export class GovApplicationService { // send tx const dialogRef = this.loadingDialog.open('Sending'); - let voteResult: InlineResponse20075 | undefined; + let voteResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { @@ -282,7 +282,7 @@ export class GovApplicationService { const dialogRef = this.loadingDialog.open('Sending'); - let depositResult: InlineResponse20075 | undefined; + let depositResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { diff --git a/projects/portal/src/app/models/cosmos/gov.service.ts b/projects/portal/src/app/models/cosmos/gov.service.ts index 2137908bc..868041340 100644 --- a/projects/portal/src/app/models/cosmos/gov.service.ts +++ b/projects/portal/src/app/models/cosmos/gov.service.ts @@ -7,7 +7,7 @@ import { SimulatedTxResultResponse } from './tx-common.model'; import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; import { cosmosclient, rest, proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; @Injectable({ @@ -26,7 +26,7 @@ export class GovService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey: Uint8Array, - ): Promise { + ): Promise { const txBuilder = await this.buildSubmitProposal(keyType, gas, fee, privateKey); return await this.txCommonService.announceTx(txBuilder); } @@ -128,7 +128,7 @@ export class GovService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildVoteTxBuilder( proposalID, @@ -223,7 +223,7 @@ export class GovService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildDepositTxBuilder( proposalID, diff --git a/projects/portal/src/app/models/cosmos/slashing.application.service.ts b/projects/portal/src/app/models/cosmos/slashing.application.service.ts index ed0229788..3317a9f8c 100644 --- a/projects/portal/src/app/models/cosmos/slashing.application.service.ts +++ b/projects/portal/src/app/models/cosmos/slashing.application.service.ts @@ -10,7 +10,7 @@ import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -86,7 +86,7 @@ export class SlashingApplicationService { // send tx const dialogRef = this.loadingDialog.open('Sending...'); - let txResult: InlineResponse20075 | undefined; + let txResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { txResult = await this.slashingService.unjail(validatorAddress, currentCosmosWallet, gas, fee); diff --git a/projects/portal/src/app/models/cosmos/slashing.service.ts b/projects/portal/src/app/models/cosmos/slashing.service.ts index 1c6132a79..456fc2436 100644 --- a/projects/portal/src/app/models/cosmos/slashing.service.ts +++ b/projects/portal/src/app/models/cosmos/slashing.service.ts @@ -3,7 +3,7 @@ import { SimulatedTxResultResponse } from './tx-common.model'; import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; @Injectable({ providedIn: 'root', @@ -17,7 +17,7 @@ export class SlashingService { gas: proto.cosmos.base.v1beta1.ICoin | undefined, fee: proto.cosmos.base.v1beta1.ICoin | undefined, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildUnjailTxBuilder(validatorAddress, cosmosPublicKey, gas, fee); const signerBaseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); diff --git a/projects/portal/src/app/models/cosmos/staking.application.service.ts b/projects/portal/src/app/models/cosmos/staking.application.service.ts index 5e00a5114..72cf528db 100644 --- a/projects/portal/src/app/models/cosmos/staking.application.service.ts +++ b/projects/portal/src/app/models/cosmos/staking.application.service.ts @@ -19,7 +19,7 @@ import { Router } from '@angular/router'; import { proto } from '@cosmos-client/core'; import { InlineResponse20014Validators, - InlineResponse20075, + InlineResponse20050, } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -241,7 +241,7 @@ export class StakingApplicationService { const dialogRef = this.loadingDialog.open('Loading...'); - let createValidatorResult: InlineResponse20075 | undefined; + let createValidatorResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { @@ -334,7 +334,7 @@ export class StakingApplicationService { // send tx const dialogRef = this.loadingDialog.open('Sending'); - let txResult: InlineResponse20075 | undefined; + let txResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { @@ -430,7 +430,7 @@ export class StakingApplicationService { //send tx const dialogRef = this.loadingDialog.open('Sending'); - let txResult: InlineResponse20075 | undefined; + let txResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { @@ -524,7 +524,7 @@ export class StakingApplicationService { // send tx const dialogRef = this.loadingDialog.open('Sending'); - let undelegateResult: InlineResponse20075 | undefined; + let undelegateResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { diff --git a/projects/portal/src/app/models/cosmos/staking.service.ts b/projects/portal/src/app/models/cosmos/staking.service.ts index 64b403813..33b88ba67 100644 --- a/projects/portal/src/app/models/cosmos/staking.service.ts +++ b/projects/portal/src/app/models/cosmos/staking.service.ts @@ -8,7 +8,7 @@ import { SimulatedTxResultResponse } from './tx-common.model'; import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; import { cosmosclient, rest, proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import BigNumber from 'bignumber.js'; import Long from 'long'; @@ -19,7 +19,7 @@ export class StakingService { constructor( private readonly cosmosSDK: CosmosSDKService, private readonly txCommonService: TxCommonService, - ) { } + ) {} // Create Validator async createValidator( @@ -28,7 +28,7 @@ export class StakingService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin | null, privateKey: Uint8Array, - ): Promise { + ): Promise { const txBuilder = await this.buildCreateValidator( keyType, createValidatorData, @@ -194,7 +194,7 @@ export class StakingService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildCreateDelegateTxBuilder( validatorAddress, @@ -291,7 +291,7 @@ export class StakingService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildRedelegateTxBuilder( @@ -402,7 +402,7 @@ export class StakingService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildUndelegateTxBuilder( validatorAddress, diff --git a/projects/portal/src/app/models/cosmos/tx-common.service.ts b/projects/portal/src/app/models/cosmos/tx-common.service.ts index 4cdac239a..0179a8a73 100644 --- a/projects/portal/src/app/models/cosmos/tx-common.service.ts +++ b/projects/portal/src/app/models/cosmos/tx-common.service.ts @@ -11,7 +11,7 @@ import { SimulatedTxResultResponse } from './tx-common.model'; import { Injectable } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; @Injectable({ @@ -290,7 +290,7 @@ export class TxCommonService { }; } - async announceTx(txBuilder: cosmosclient.TxBuilder): Promise { + async announceTx(txBuilder: cosmosclient.TxBuilder): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); console.log(txBuilder); diff --git a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts index 30b9820e4..273ae60eb 100644 --- a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts +++ b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts @@ -7,7 +7,7 @@ import { CosmosWallet, WalletType } from '../../../wallets/wallet.model'; import { SimulatedTxResultResponse } from './tx-common.model'; import { Injectable } from '@angular/core'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; @Injectable({ @@ -268,7 +268,7 @@ export class TxCommonService { }; } - async announceTx(txBuilder: cosmosclient.TxBuilder): Promise { + async announceTx(txBuilder: cosmosclient.TxBuilder): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); console.log(txBuilder); diff --git a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.application.service.ts b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.application.service.ts index d9e68e125..f75b5bcc8 100644 --- a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.application.service.ts +++ b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.application.service.ts @@ -14,7 +14,7 @@ import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -110,7 +110,7 @@ export class NftTxApplicationService { // send tx const dialogRef = this.loadingDialog.open('Sending'); - let txResult: InlineResponse20075 | undefined; + let txResult: InlineResponse20050 | undefined; let txHash: string | undefined; try { diff --git a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.infrastructure.service.ts b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.infrastructure.service.ts index 4cde70a6f..d7d6d2069 100644 --- a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.infrastructure.service.ts +++ b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.infrastructure.service.ts @@ -6,7 +6,7 @@ import { MsgListNftData } from './nft-tx.model'; import { INftTxInfrastructureService } from './nft-tx.service'; import { Injectable } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; @Injectable({ providedIn: 'root', @@ -24,7 +24,7 @@ export class NftTxInfrastructureService implements INftTxInfrastructureService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; const txBuilder = await this.buildListNftTxBuilder(msgListNftData, cosmosPublicKey, gas, fee); const signerBaseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); diff --git a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.service.ts b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.service.ts index 95ab0df7f..f1cca63bd 100644 --- a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.service.ts +++ b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.service.ts @@ -4,7 +4,7 @@ import { NftTxInfrastructureService } from './nft-tx.infrastructure.service'; import { MsgListNftData } from './nft-tx.model'; import { Injectable } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20075 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; export interface INftTxInfrastructureService { simulateToListNft( @@ -20,7 +20,7 @@ export interface INftTxInfrastructureService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise; + ): Promise; } @Injectable({ @@ -40,7 +40,7 @@ export class NftTxService { gas: proto.cosmos.base.v1beta1.ICoin, fee: proto.cosmos.base.v1beta1.ICoin, privateKey?: string, - ): Promise { + ): Promise { return this.iNftTxInfrastructureService.listNft( msgListNftData, currentCosmosWallet, From 1e12480b5efb56489d8d6b421b8bce921805d9f9 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Wed, 22 Jun 2022 13:12:49 +0900 Subject: [PATCH 14/77] fix: tx simulate response type name from InlineResponse20074 to InlineResponse20049 --- projects/explorer/src/app/models/cosmos/tx-common.model.ts | 4 ++-- projects/portal/src/app/models/cosmos/tx-common.model.ts | 4 ++-- .../shared/src/lib/models/cosmos/tx/common/tx-common.model.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/explorer/src/app/models/cosmos/tx-common.model.ts b/projects/explorer/src/app/models/cosmos/tx-common.model.ts index 5f09848b9..91a756def 100644 --- a/projects/explorer/src/app/models/cosmos/tx-common.model.ts +++ b/projects/explorer/src/app/models/cosmos/tx-common.model.ts @@ -1,8 +1,8 @@ import { proto } from '@cosmos-client/core'; -import { InlineResponse20074 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20049 } from '@cosmos-client/core/esm/openapi'; export type SimulatedTxResultResponse = { - simulatedResultData: InlineResponse20074; + simulatedResultData: InlineResponse20049; minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; estimatedGasUsedWithMargin: proto.cosmos.base.v1beta1.ICoin; estimatedFeeWithMargin: proto.cosmos.base.v1beta1.ICoin; diff --git a/projects/portal/src/app/models/cosmos/tx-common.model.ts b/projects/portal/src/app/models/cosmos/tx-common.model.ts index 06458b0df..1621d0fa9 100644 --- a/projects/portal/src/app/models/cosmos/tx-common.model.ts +++ b/projects/portal/src/app/models/cosmos/tx-common.model.ts @@ -1,8 +1,8 @@ import { proto } from '@cosmos-client/core'; -import { InlineResponse20074 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20049 } from '@cosmos-client/core/esm/openapi'; export type SimulatedTxResultResponse = { - simulatedResultData?: InlineResponse20074; + simulatedResultData?: InlineResponse20049; minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; estimatedGasUsedWithMargin: proto.cosmos.base.v1beta1.ICoin; estimatedFeeWithMargin: proto.cosmos.base.v1beta1.ICoin; diff --git a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.model.ts b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.model.ts index c661d9781..874266455 100644 --- a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.model.ts +++ b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.model.ts @@ -1,8 +1,8 @@ import { proto } from '@cosmos-client/core'; -import { InlineResponse20074 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20049 } from '@cosmos-client/core/esm/openapi'; export type SimulatedTxResultResponse = { - simulatedResultData?: InlineResponse20074; + simulatedResultData?: InlineResponse20049; minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; estimatedGasUsedWithMargin: proto.cosmos.base.v1beta1.ICoin; estimatedFeeWithMargin: proto.cosmos.base.v1beta1.ICoin; From 34ae1e7de18f312dfed43980ea30d754a91f8a38 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Wed, 22 Jun 2022 13:17:53 +0900 Subject: [PATCH 15/77] fix: delegations and validators data type name from InlineResponse20063 to InlineResponse20038 from InlineResponse20066 to InlineResponse20041 --- .../staking/delegators/delegator/delegator.component.ts | 6 +++--- .../staking/delegators/delegator/delegator.component.ts | 6 +++--- .../app/pages/delegate/validators/validators.component.ts | 4 ++-- .../delegate-menu-dialog.component.ts | 8 ++++---- .../redelegate-form-dialog.component.ts | 4 ++-- .../undelegate-form-dialog.component.ts | 4 ++-- .../staking/delegators/delegator/delegator.component.ts | 6 +++--- .../app/views/delegate/validators/validators.component.ts | 4 ++-- .../delegate-menu-dialog.component.ts | 4 ++-- .../redelegate-form-dialog.component.ts | 4 ++-- .../undelegate-form-dialog.component.ts | 4 ++-- .../withdraw-delegator-reward-form-dialog.component.ts | 2 +- ...withdraw-validator-commission-form-dialog.component.ts | 2 +- 13 files changed, 29 insertions(+), 29 deletions(-) diff --git a/projects/explorer/src/app/views/cosmos/staking/delegators/delegator/delegator.component.ts b/projects/explorer/src/app/views/cosmos/staking/delegators/delegator/delegator.component.ts index 0f9aee958..e2e8f6845 100644 --- a/projects/explorer/src/app/views/cosmos/staking/delegators/delegator/delegator.component.ts +++ b/projects/explorer/src/app/views/cosmos/staking/delegators/delegator/delegator.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { InlineResponse20063, InlineResponse20066 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20038, InlineResponse20041 } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-delegator', @@ -8,10 +8,10 @@ import { InlineResponse20063, InlineResponse20066 } from '@cosmos-client/core/es }) export class DelegatorComponent implements OnInit { @Input() - delegations?: InlineResponse20063 | null; + delegations?: InlineResponse20038 | null; @Input() - validators?: InlineResponse20066 | null; + validators?: InlineResponse20041 | null; constructor() {} diff --git a/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts b/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts index 8ff0fe857..e4baa626f 100644 --- a/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts +++ b/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../../../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { cosmosclient, rest } from '@cosmos-client/core'; -import { InlineResponse20063, InlineResponse20066 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20038, InlineResponse20041 } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -12,8 +12,8 @@ import { map, mergeMap } from 'rxjs/operators'; styleUrls: ['./delegator.component.css'], }) export class DelegatorComponent implements OnInit { - delegations$: Observable; - validators$: Observable; + delegations$: Observable; + validators$: Observable; constructor( private readonly route: ActivatedRoute, diff --git a/projects/portal/src/app/pages/delegate/validators/validators.component.ts b/projects/portal/src/app/pages/delegate/validators/validators.component.ts index 805311bf9..70c32a149 100644 --- a/projects/portal/src/app/pages/delegate/validators/validators.component.ts +++ b/projects/portal/src/app/pages/delegate/validators/validators.component.ts @@ -9,7 +9,7 @@ import { import { Component, OnInit } from '@angular/core'; import { cosmosclient, rest } from '@cosmos-client/core'; import { - InlineResponse20063DelegationResponses, + InlineResponse20038DelegationResponses, InlineResponse20014Validators, InlineResponse20041Validators, InlineResponse20072, @@ -28,7 +28,7 @@ export class ValidatorsComponent implements OnInit { validatorsWithShare$: Observable; validators$: Observable; currentStoredWallet$: Observable; - delegations$: Observable; + delegations$: Observable; delegatedValidators$: Observable<(InlineResponse20041Validators | undefined)[] | undefined>; totalDelegation$: Observable; unbondingDelegations$: Observable<(InlineResponse20072 | undefined)[]>; diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts index 6c000d880..e7fb177a8 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts @@ -4,10 +4,10 @@ import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; import { - InlineResponse20063, + InlineResponse20038, InlineResponse20014Validators, CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse, - InlineResponse20063Delegation, + InlineResponse20038Delegation, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod, } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; @@ -26,8 +26,8 @@ import { filter, map, mergeMap } from 'rxjs/operators'; export class DelegateMenuDialogComponent implements OnInit { selectedValidator: InlineResponse20014Validators | undefined; currentStoredWallet$: Observable; - delegations$: Observable; - delegation$: Observable; + delegations$: Observable; + delegation$: Observable; delegateAmount$: Observable; isDelegated$: Observable | undefined; totalRewards$: Observable< diff --git a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index 594968940..5fc14fee0 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -3,7 +3,7 @@ import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dial import { MatSnackBar } from '@angular/material/snack-bar'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; import { - InlineResponse20063, + InlineResponse20038, InlineResponse20014Validators, InlineResponse20041Validators, } from '@cosmos-client/core/esm/openapi/api'; @@ -25,7 +25,7 @@ import { filter, map, mergeMap } from 'rxjs/operators'; export class RedelegateFormDialogComponent implements OnInit { validatorsList$: Observable; currentStoredWallet$: Observable; - delegations$: Observable; + delegations$: Observable; delegateAmount$: Observable; coins$: Observable; uguuBalance$: Observable | undefined; diff --git a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts index 40cf35a9f..cae719c99 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts @@ -2,7 +2,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; import { - InlineResponse20063, + InlineResponse20038, InlineResponse20072, InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi/api'; @@ -22,7 +22,7 @@ import { filter, map, mergeMap } from 'rxjs/operators'; }) export class UndelegateFormDialogComponent implements OnInit { currentStoredWallet$: Observable; - delegations$: Observable; + delegations$: Observable; delegateAmount$: Observable; coins$: Observable; uguuBalance$: Observable | undefined; diff --git a/projects/portal/src/app/views/cosmos/staking/delegators/delegator/delegator.component.ts b/projects/portal/src/app/views/cosmos/staking/delegators/delegator/delegator.component.ts index 0f9aee958..e2e8f6845 100644 --- a/projects/portal/src/app/views/cosmos/staking/delegators/delegator/delegator.component.ts +++ b/projects/portal/src/app/views/cosmos/staking/delegators/delegator/delegator.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { InlineResponse20063, InlineResponse20066 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20038, InlineResponse20041 } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-delegator', @@ -8,10 +8,10 @@ import { InlineResponse20063, InlineResponse20066 } from '@cosmos-client/core/es }) export class DelegatorComponent implements OnInit { @Input() - delegations?: InlineResponse20063 | null; + delegations?: InlineResponse20038 | null; @Input() - validators?: InlineResponse20066 | null; + validators?: InlineResponse20041 | null; constructor() {} diff --git a/projects/portal/src/app/views/delegate/validators/validators.component.ts b/projects/portal/src/app/views/delegate/validators/validators.component.ts index 446aee4c6..2ef08b3c9 100644 --- a/projects/portal/src/app/views/delegate/validators/validators.component.ts +++ b/projects/portal/src/app/views/delegate/validators/validators.component.ts @@ -1,7 +1,7 @@ import { StoredWallet } from '../../../models/wallets/wallet.model'; import { Component, EventEmitter, OnInit, Output, Input } from '@angular/core'; import { - InlineResponse20063DelegationResponses, + InlineResponse20038DelegationResponses, InlineResponse20041Validators, InlineResponse20072, } from '@cosmos-client/core/esm/openapi'; @@ -30,7 +30,7 @@ export class ValidatorsComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() - delegations?: InlineResponse20063DelegationResponses[] | null; + delegations?: InlineResponse20038DelegationResponses[] | null; @Input() delegatedValidators?: (InlineResponse20041Validators | undefined)[] | null; @Input() diff --git a/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts index 27994b44c..764010019 100644 --- a/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { - InlineResponse20063, + InlineResponse20038, InlineResponse20014Validators, CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod, @@ -20,7 +20,7 @@ export class DelegateMenuDialogComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() - delegations?: InlineResponse20063 | null; + delegations?: InlineResponse20038 | null; @Input() delegateAmount?: proto.cosmos.base.v1beta1.ICoin | null; @Input() diff --git a/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index e716f859d..bc94e8af2 100644 --- a/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { - InlineResponse20063, + InlineResponse20038, InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @@ -26,7 +26,7 @@ export class RedelegateFormDialogComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() - delegations?: InlineResponse20063 | null; + delegations?: InlineResponse20038 | null; @Input() delegateAmount?: proto.cosmos.base.v1beta1.ICoin | null; @Input() diff --git a/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts index cbbadab91..c013283f7 100644 --- a/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { - InlineResponse20063, + InlineResponse20038, InlineResponse20072, InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi'; @@ -23,7 +23,7 @@ export class UndelegateFormDialogComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() - delegations?: InlineResponse20063 | null; + delegations?: InlineResponse20038 | null; @Input() delegateAmount?: proto.cosmos.base.v1beta1.ICoin | null; @Input() diff --git a/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts index 67afd5387..0bab2d68c 100644 --- a/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { - InlineResponse20063, + InlineResponse20038, InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; diff --git a/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts index 275303c9e..6fe7f1943 100644 --- a/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { - InlineResponse20063, + InlineResponse20038, InlineResponse20014Validators, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; From 51794f761bd866a104f829cdf1f03bb80f6d375a Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Wed, 22 Jun 2022 13:21:34 +0900 Subject: [PATCH 16/77] fix: node info data type name from InlineResponse20037 to InlineResponse20012 --- projects/explorer/src/app/pages/home/home.component.ts | 4 ++-- projects/explorer/src/app/views/home/home.component.ts | 4 ++-- .../marketplace/src/app/pages/balance/balance.component.ts | 4 ++-- .../marketplace/src/app/views/balance/balance.component.ts | 4 ++-- projects/portal/src/app/pages/balance/balance.component.ts | 4 ++-- projects/portal/src/app/pages/home/home.component.ts | 4 ++-- projects/portal/src/app/views/balance/balance.component.ts | 4 ++-- projects/portal/src/app/views/home/home.component.ts | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/projects/explorer/src/app/pages/home/home.component.ts b/projects/explorer/src/app/pages/home/home.component.ts index 43db96d60..9803819c4 100644 --- a/projects/explorer/src/app/pages/home/home.component.ts +++ b/projects/explorer/src/app/pages/home/home.component.ts @@ -1,7 +1,7 @@ import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { Component, OnDestroy, OnInit } from '@angular/core'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20037 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable, timer } from 'rxjs'; import { mergeMap, map } from 'rxjs/operators'; @@ -11,7 +11,7 @@ import { mergeMap, map } from 'rxjs/operators'; styleUrls: ['./home.component.css'], }) export class HomeComponent implements OnInit, OnDestroy { - nodeInfo$: Observable; + nodeInfo$: Observable; syncing$: Observable; constructor(private cosmosSDK: CosmosSDKService) { diff --git a/projects/explorer/src/app/views/home/home.component.ts b/projects/explorer/src/app/views/home/home.component.ts index 819e5b6df..2cd56c781 100644 --- a/projects/explorer/src/app/views/home/home.component.ts +++ b/projects/explorer/src/app/views/home/home.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, Input } from '@angular/core'; -import { InlineResponse20037 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-home', @@ -8,7 +8,7 @@ import { InlineResponse20037 } from '@cosmos-client/core/esm/openapi'; }) export class HomeComponent implements OnInit { @Input() - nodeInfo?: InlineResponse20037 | null; + nodeInfo?: InlineResponse20012 | null; @Input() syncing?: boolean | null; diff --git a/projects/marketplace/src/app/pages/balance/balance.component.ts b/projects/marketplace/src/app/pages/balance/balance.component.ts index 4435dc6c3..386091110 100644 --- a/projects/marketplace/src/app/pages/balance/balance.component.ts +++ b/projects/marketplace/src/app/pages/balance/balance.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; -import { InlineResponse20037 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { PubKey } from '@cosmos-client/core/esm/types'; import { Config, ConfigService } from 'projects/shared/src/lib/models/config/config.service'; import { CosmosSDKService } from 'projects/shared/src/lib/models/cosmos-sdk/cosmos-sdk.service'; @@ -60,7 +60,7 @@ export class BalanceComponent implements OnInit { }[] | undefined >; - nodeInfo$: Observable; + nodeInfo$: Observable; constructor( private configService: ConfigService, diff --git a/projects/marketplace/src/app/views/balance/balance.component.ts b/projects/marketplace/src/app/views/balance/balance.component.ts index 97af2f4ab..b34a150fd 100644 --- a/projects/marketplace/src/app/views/balance/balance.component.ts +++ b/projects/marketplace/src/app/views/balance/balance.component.ts @@ -2,7 +2,7 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { Component, Input, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20037 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { WalletType } from 'projects/shared/src/lib/models/wallets/wallet.model'; @Component({ @@ -27,7 +27,7 @@ export class ViewBalanceComponent implements OnInit { maxCredit: number; }[] | null; - @Input() nodeInfo?: InlineResponse20037 | null; + @Input() nodeInfo?: InlineResponse20012 | null; constructor(private readonly snackBar: MatSnackBar, private clipboard: Clipboard) {} diff --git a/projects/portal/src/app/pages/balance/balance.component.ts b/projects/portal/src/app/pages/balance/balance.component.ts index c2e943e54..3fdc5e062 100644 --- a/projects/portal/src/app/pages/balance/balance.component.ts +++ b/projects/portal/src/app/pages/balance/balance.component.ts @@ -9,7 +9,7 @@ import { } from '../../utils/converter'; import { Component, OnInit } from '@angular/core'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; -import { InlineResponse20037 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { PubKey } from '@cosmos-client/core/esm/types'; import { combineLatest, Observable, of } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -56,7 +56,7 @@ export class BalanceComponent implements OnInit { }[] | undefined >; - nodeInfo$: Observable; + nodeInfo$: Observable; constructor( private configService: ConfigService, diff --git a/projects/portal/src/app/pages/home/home.component.ts b/projects/portal/src/app/pages/home/home.component.ts index 43db96d60..9803819c4 100644 --- a/projects/portal/src/app/pages/home/home.component.ts +++ b/projects/portal/src/app/pages/home/home.component.ts @@ -1,7 +1,7 @@ import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { Component, OnDestroy, OnInit } from '@angular/core'; import { rest } from '@cosmos-client/core'; -import { InlineResponse20037 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable, timer } from 'rxjs'; import { mergeMap, map } from 'rxjs/operators'; @@ -11,7 +11,7 @@ import { mergeMap, map } from 'rxjs/operators'; styleUrls: ['./home.component.css'], }) export class HomeComponent implements OnInit, OnDestroy { - nodeInfo$: Observable; + nodeInfo$: Observable; syncing$: Observable; constructor(private cosmosSDK: CosmosSDKService) { diff --git a/projects/portal/src/app/views/balance/balance.component.ts b/projects/portal/src/app/views/balance/balance.component.ts index 667d3d1c9..7ebc62533 100644 --- a/projects/portal/src/app/views/balance/balance.component.ts +++ b/projects/portal/src/app/views/balance/balance.component.ts @@ -3,7 +3,7 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { Component, Input, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20037 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-balance', @@ -27,7 +27,7 @@ export class ViewBalanceComponent implements OnInit { maxCredit: number; }[] | null; - @Input() nodeInfo?: InlineResponse20037 | null; + @Input() nodeInfo?: InlineResponse20012 | null; constructor(private readonly snackBar: MatSnackBar, private clipboard: Clipboard) {} diff --git a/projects/portal/src/app/views/home/home.component.ts b/projects/portal/src/app/views/home/home.component.ts index 819e5b6df..2cd56c781 100644 --- a/projects/portal/src/app/views/home/home.component.ts +++ b/projects/portal/src/app/views/home/home.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, Input } from '@angular/core'; -import { InlineResponse20037 } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; @Component({ selector: 'view-home', @@ -8,7 +8,7 @@ import { InlineResponse20037 } from '@cosmos-client/core/esm/openapi'; }) export class HomeComponent implements OnInit { @Input() - nodeInfo?: InlineResponse20037 | null; + nodeInfo?: InlineResponse20012 | null; @Input() syncing?: boolean | null; From 9fcac7d99023cfe497910449741cd24c6b481a43 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Wed, 22 Jun 2022 16:07:05 +0900 Subject: [PATCH 17/77] fix: delegations and validators data type name from InlineResponse20072 to InlineResponse20047 from InlineResponse20014Validators to InlineResponse20041Validators --- .../distribution.application.service.ts | 6 +++--- .../cosmos/staking.application.service.ts | 10 +++++----- .../validators/validators.component.ts | 9 ++++----- .../delegate-form-dialog.component.ts | 10 +++++----- .../delegate-menu-dialog.component.ts | 20 +++++++++---------- .../redelegate-form-dialog.component.ts | 9 ++++----- .../undelegate-form-dialog.component.ts | 17 ++++++++-------- ...-delegator-reward-form-dialog.component.ts | 8 ++++---- ...idator-commission-form-dialog.component.ts | 8 ++++---- .../validators/validators.component.ts | 6 +++--- .../validator/validator.component.ts | 6 +++--- .../validators/validators.component.ts | 4 ++-- .../delegate-form-dialog.component.ts | 8 ++++---- .../delegate-menu-dialog.component.ts | 16 +++++++-------- .../redelegate-form-dialog.component.ts | 14 ++++++------- .../undelegate-form-dialog.component.ts | 8 ++++---- ...-delegator-reward-form-dialog.component.ts | 7 ++----- ...idator-commission-form-dialog.component.ts | 4 ++-- 18 files changed, 83 insertions(+), 87 deletions(-) diff --git a/projects/portal/src/app/models/cosmos/distribution.application.service.ts b/projects/portal/src/app/models/cosmos/distribution.application.service.ts index adce6c86c..f2fcfe699 100644 --- a/projects/portal/src/app/models/cosmos/distribution.application.service.ts +++ b/projects/portal/src/app/models/cosmos/distribution.application.service.ts @@ -12,7 +12,7 @@ import { Router } from '@angular/router'; import { proto } from '@cosmos-client/core'; import { InlineResponse20050, - InlineResponse20014Validators, + InlineResponse20041Validators, } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -31,7 +31,7 @@ export class DistributionApplicationService { ) {} async openWithdrawDelegatorRewardFormDialog( - validator: InlineResponse20014Validators, + validator: InlineResponse20041Validators, ): Promise { const txHash = await this.dialog .open(WithdrawDelegatorRewardFormDialogComponent, { data: validator }) @@ -41,7 +41,7 @@ export class DistributionApplicationService { } async openWithdrawValidatorCommissionFormDialog( - validator: InlineResponse20014Validators, + validator: InlineResponse20041Validators, ): Promise { const txHash = await this.dialog .open(WithdrawValidatorCommissionFormDialogComponent, { data: validator }) diff --git a/projects/portal/src/app/models/cosmos/staking.application.service.ts b/projects/portal/src/app/models/cosmos/staking.application.service.ts index 72cf528db..0d87c1495 100644 --- a/projects/portal/src/app/models/cosmos/staking.application.service.ts +++ b/projects/portal/src/app/models/cosmos/staking.application.service.ts @@ -18,7 +18,7 @@ import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; import { proto } from '@cosmos-client/core'; import { - InlineResponse20014Validators, + InlineResponse20041Validators, InlineResponse20050, } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; @@ -48,14 +48,14 @@ export class StakingApplicationService { private readonly walletApplicationService: WalletApplicationService, ) {} - async openDelegateMenuDialog(validator: InlineResponse20014Validators): Promise { + async openDelegateMenuDialog(validator: InlineResponse20041Validators): Promise { await this.dialog .open(DelegateMenuDialogComponent, { data: validator }) .afterClosed() .toPromise(); } - async openDelegateFormDialog(validator: InlineResponse20014Validators): Promise { + async openDelegateFormDialog(validator: InlineResponse20041Validators): Promise { const txHash = await this.dialog .open(DelegateFormDialogComponent, { data: validator }) .afterClosed() @@ -63,7 +63,7 @@ export class StakingApplicationService { await this.router.navigate(['txs', txHash]); } - async openRedelegateFormDialog(validator: InlineResponse20014Validators): Promise { + async openRedelegateFormDialog(validator: InlineResponse20041Validators): Promise { const txHash = await this.dialog .open(RedelegateFormDialogComponent, { data: validator }) .afterClosed() @@ -71,7 +71,7 @@ export class StakingApplicationService { await this.router.navigate(['txs', txHash]); } - async openUndelegateFormDialog(validator: InlineResponse20014Validators): Promise { + async openUndelegateFormDialog(validator: InlineResponse20041Validators): Promise { const txHash = await this.dialog .open(UndelegateFormDialogComponent, { data: validator }) .afterClosed() diff --git a/projects/portal/src/app/pages/delegate/validators/validators.component.ts b/projects/portal/src/app/pages/delegate/validators/validators.component.ts index 70c32a149..3bf60d078 100644 --- a/projects/portal/src/app/pages/delegate/validators/validators.component.ts +++ b/projects/portal/src/app/pages/delegate/validators/validators.component.ts @@ -10,9 +10,8 @@ import { Component, OnInit } from '@angular/core'; import { cosmosclient, rest } from '@cosmos-client/core'; import { InlineResponse20038DelegationResponses, - InlineResponse20014Validators, InlineResponse20041Validators, - InlineResponse20072, + InlineResponse20047, } from '@cosmos-client/core/esm/openapi'; import { of, Observable, BehaviorSubject, combineLatest, zip } from 'rxjs'; import { filter, map, mergeMap, concatMap, withLatestFrom } from 'rxjs/operators'; @@ -31,8 +30,8 @@ export class ValidatorsComponent implements OnInit { delegations$: Observable; delegatedValidators$: Observable<(InlineResponse20041Validators | undefined)[] | undefined>; totalDelegation$: Observable; - unbondingDelegations$: Observable<(InlineResponse20072 | undefined)[]>; - filteredUnbondingDelegations$: Observable<(InlineResponse20072 | undefined)[]>; + unbondingDelegations$: Observable<(InlineResponse20047 | undefined)[]>; + filteredUnbondingDelegations$: Observable<(InlineResponse20047 | undefined)[]>; activeEnabled: BehaviorSubject = new BehaviorSubject(true); @@ -171,7 +170,7 @@ export class ValidatorsComponent implements OnInit { this.activeEnabled.next(value); } - onSelectValidator(validator: InlineResponse20014Validators) { + onSelectValidator(validator: InlineResponse20041Validators) { this.stakingAppService.openDelegateMenuDialog(validator); } } diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts index 03040a9c6..59d14adb1 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts @@ -27,11 +27,11 @@ export class DelegateFormDialogComponent implements OnInit { uguuBalance$: Observable | undefined; minimumGasPrices$: Observable; validatorsList$: Observable; - validator: InlineResponse20014Validators | undefined; + validator: InlineResponse20041Validators | undefined; constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20014Validators, + public readonly data: InlineResponse20041Validators, public matDialogRef: MatDialogRef, private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, @@ -69,12 +69,12 @@ export class DelegateFormDialogComponent implements OnInit { async onSubmit($event: DelegateOnSubmitEvent) { const validatorStatus = $event.validatorList.find( - (val) => val.address == this.validator?.address, + (val) => val.operator_address == this.validator?.operator_address, )?.status; if (validatorStatus != 'BOND_STATUS_BONDED') { const inactiveValidatorResult = await this.dialog .open(InactiveValidatorConfirmDialogComponent, { - data: { valAddress: this.validator?.address!, isConfirmed: false }, + data: { valAddress: this.validator?.operator_address!, isConfirmed: false }, }) .afterClosed() .toPromise(); @@ -87,7 +87,7 @@ export class DelegateFormDialogComponent implements OnInit { let txHash: string | undefined; txHash = await this.stakingAppService.createDelegate( - this.validator?.address!, + this.validator?.operator_address!, $event.amount, $event.minimumGasPrice, $event.gasRatio, diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts index e7fb177a8..a7885f7d4 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts @@ -5,7 +5,7 @@ import { Router } from '@angular/router'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; import { InlineResponse20038, - InlineResponse20014Validators, + InlineResponse20041Validators, CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse, InlineResponse20038Delegation, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod, @@ -24,7 +24,7 @@ import { filter, map, mergeMap } from 'rxjs/operators'; styleUrls: ['./delegate-menu-dialog.component.css'], }) export class DelegateMenuDialogComponent implements OnInit { - selectedValidator: InlineResponse20014Validators | undefined; + selectedValidator: InlineResponse20041Validators | undefined; currentStoredWallet$: Observable; delegations$: Observable; delegation$: Observable; @@ -41,7 +41,7 @@ export class DelegateMenuDialogComponent implements OnInit { constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20014Validators, + public readonly data: InlineResponse20041Validators, private router: Router, public matDialogRef: MatDialogRef, private readonly stakingAppService: StakingApplicationService, @@ -140,33 +140,33 @@ export class DelegateMenuDialogComponent implements OnInit { ngOnInit() {} - onSubmitDelegate(validator: InlineResponse20014Validators) { + onSubmitDelegate(validator: InlineResponse20041Validators) { this.matDialogRef.close(); this.stakingAppService.openDelegateFormDialog(validator); } - onSubmitRedelegate(validator: InlineResponse20014Validators) { + onSubmitRedelegate(validator: InlineResponse20041Validators) { this.matDialogRef.close(); this.stakingAppService.openRedelegateFormDialog(validator); } - onSubmitUndelegate(validator: InlineResponse20014Validators) { + onSubmitUndelegate(validator: InlineResponse20041Validators) { this.matDialogRef.close(); this.stakingAppService.openUndelegateFormDialog(validator); } - onSubmitWithdrawDelegatorReward(validator: InlineResponse20014Validators) { + onSubmitWithdrawDelegatorReward(validator: InlineResponse20041Validators) { this.matDialogRef.close(); this.distributionAppService.openWithdrawDelegatorRewardFormDialog(validator); } - onSubmitWithdrawValidatorCommission(validator: InlineResponse20014Validators) { + onSubmitWithdrawValidatorCommission(validator: InlineResponse20041Validators) { this.matDialogRef.close(); this.distributionAppService.openWithdrawValidatorCommissionFormDialog(validator); } - onSubmitDetail(validator: InlineResponse20014Validators) { + onSubmitDetail(validator: InlineResponse20041Validators) { this.matDialogRef.close(); - this.router.navigate(['delegate', 'validators', validator.address]); + this.router.navigate(['delegate', 'validators', validator.operator_address]); } } diff --git a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index 5fc14fee0..75b2326c9 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -4,7 +4,6 @@ import { MatSnackBar } from '@angular/material/snack-bar'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; import { InlineResponse20038, - InlineResponse20014Validators, InlineResponse20041Validators, } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; @@ -30,11 +29,11 @@ export class RedelegateFormDialogComponent implements OnInit { coins$: Observable; uguuBalance$: Observable | undefined; minimumGasPrices$: Observable; - validator: InlineResponse20014Validators | undefined; + validator: InlineResponse20041Validators | undefined; constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20014Validators, + public readonly data: InlineResponse20041Validators, public matDialogRef: MatDialogRef, private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, @@ -86,7 +85,7 @@ export class RedelegateFormDialogComponent implements OnInit { async onSubmit($event: RedelegateOnSubmitEvent) { const validatorStatus = $event.validatorList.find( - (val) => val.address == $event.destinationValidator, + (val) => val.operator_address == $event.destinationValidator, )?.status; if (validatorStatus != 'BOND_STATUS_BONDED') { const inactiveValidatorResult = await this.dialog @@ -103,7 +102,7 @@ export class RedelegateFormDialogComponent implements OnInit { } const txHash = await this.stakingAppService.Redelegate( - this.validator?.address!, + this.validator?.operator_address!, $event.destinationValidator, $event.amount, $event.minimumGasPrice, diff --git a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts index cae719c99..eb9d2a809 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts @@ -3,8 +3,8 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { cosmosclient, proto, rest } from '@cosmos-client/core'; import { InlineResponse20038, - InlineResponse20072, - InlineResponse20014Validators, + InlineResponse20047, + InlineResponse20041Validators, } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; @@ -27,12 +27,12 @@ export class UndelegateFormDialogComponent implements OnInit { coins$: Observable; uguuBalance$: Observable | undefined; minimumGasPrices$: Observable; - validator: InlineResponse20014Validators | undefined; - unbondingDelegation$: Observable; + validator: InlineResponse20041Validators | undefined; + unbondingDelegation$: Observable; constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20014Validators, + public readonly data: InlineResponse20041Validators, public matDialogRef: MatDialogRef, private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, @@ -51,7 +51,7 @@ export class UndelegateFormDialogComponent implements OnInit { ); this.unbondingDelegation$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( mergeMap(([sdk, address]) => { - const valAddressString = this.validator?.address; + const valAddressString = this.validator?.operator_address; if (!valAddressString) { return of(undefined); } @@ -70,7 +70,8 @@ export class UndelegateFormDialogComponent implements OnInit { map( (delegations) => delegations.delegation_responses?.find( - (response) => response.delegation?.validator_address == this.validator?.address, + (response) => + response.delegation?.validator_address == this.validator?.operator_address, )?.balance, ), ); @@ -93,7 +94,7 @@ export class UndelegateFormDialogComponent implements OnInit { async onSubmit($event: UndelegateOnSubmitEvent) { const txHash = await this.stakingAppService.undelegate( - this.validator?.address!, + this.validator?.operator_address!, $event.amount, $event.minimumGasPrice, $event.gasRatio, diff --git a/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts index d1b6b1f83..816214693 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi/api'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { DistributionApplicationService } from 'projects/portal/src/app/models/cosmos/distribution.application.service'; @@ -19,11 +19,11 @@ import { map } from 'rxjs/operators'; export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { currentStoredWallet$: Observable; minimumGasPrices$: Observable; - validator: InlineResponse20014Validators | undefined; + validator: InlineResponse20041Validators | undefined; constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20014Validators, + public readonly data: InlineResponse20041Validators, public matDialogRef: MatDialogRef, private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, @@ -39,7 +39,7 @@ export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { async onSubmit($event: WithdrawDelegatorRewardOnSubmitEvent) { const txHash = await this.distributionAppService.withdrawDelegatorReward( - this.validator?.address!, + this.validator?.operator_address!, $event.minimumGasPrice, $event.gasRatio, ); diff --git a/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts index 01d30c5ca..cf177c2f9 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi/api'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { DistributionApplicationService } from 'projects/portal/src/app/models/cosmos/distribution.application.service'; @@ -19,11 +19,11 @@ import { map } from 'rxjs/operators'; export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { currentStoredWallet$: Observable; minimumGasPrices$: Observable; - validator: InlineResponse20014Validators | undefined; + validator: InlineResponse20041Validators | undefined; constructor( @Inject(MAT_DIALOG_DATA) - public readonly data: InlineResponse20014Validators, + public readonly data: InlineResponse20041Validators, public matDialogRef: MatDialogRef, private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, @@ -39,7 +39,7 @@ export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { async onSubmit($event: WithdrawValidatorCommissionOnSubmitEvent) { const txHash = await this.distributionAppService.withdrawValidatorCommission( - this.validator?.address!, + this.validator?.operator_address!, $event.minimumGasPrice, $event.gasRatio, ); diff --git a/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts b/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts index dbcc23622..951eb87f8 100644 --- a/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts +++ b/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input } from '@angular/core'; import { - InlineResponse20014Validators, + InlineResponse20041Validators, QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @@ -22,10 +22,10 @@ export class ValidatorsComponent implements OnInit { }, 5000); } - getColorCode(validator: InlineResponse20014Validators) { + getColorCode(validator: InlineResponse20041Validators) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator.address ?? '')) + .update(Buffer.from(validator.operator_address ?? '')) .digest() .toString('hex'); diff --git a/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts b/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts index 0d3c45f45..74f288b71 100644 --- a/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts +++ b/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts @@ -1,7 +1,7 @@ import { validatorType } from '../validators.component'; import { Component, OnInit, Input, OnChanges } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @Component({ @@ -20,10 +20,10 @@ export class ValidatorComponent implements OnInit { ngOnInit(): void {} - getColorCode(validator: InlineResponse20014Validators | undefined | null) { + getColorCode(validator: InlineResponse20041Validators | undefined | null) { const hash = crypto .createHash('sha256') - .update(Buffer.from(validator?.address ?? '')) + .update(Buffer.from(validator?.operator_address ?? '')) .digest() .toString('hex'); diff --git a/projects/portal/src/app/views/delegate/validators/validators.component.ts b/projects/portal/src/app/views/delegate/validators/validators.component.ts index 2ef08b3c9..b9828cb0f 100644 --- a/projects/portal/src/app/views/delegate/validators/validators.component.ts +++ b/projects/portal/src/app/views/delegate/validators/validators.component.ts @@ -3,7 +3,7 @@ import { Component, EventEmitter, OnInit, Output, Input } from '@angular/core'; import { InlineResponse20038DelegationResponses, InlineResponse20041Validators, - InlineResponse20072, + InlineResponse20047, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @@ -34,7 +34,7 @@ export class ValidatorsComponent implements OnInit { @Input() delegatedValidators?: (InlineResponse20041Validators | undefined)[] | null; @Input() - unbondingDelegations?: (InlineResponse20072 | undefined)[] | null; + unbondingDelegations?: (InlineResponse20047 | undefined)[] | null; @Output() toggleActiveChange: EventEmitter; diff --git a/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts index 4194edfba..592f84250 100644 --- a/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; -import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet, WalletType } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -8,7 +8,7 @@ export type DelegateOnSubmitEvent = { walletType: WalletType; amount: proto.cosmos.base.v1beta1.ICoin; minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - validatorList: InlineResponse20014Validators[]; + validatorList: InlineResponse20041Validators[]; gasRatio: number; }; @@ -21,7 +21,7 @@ export class DelegateFormDialogComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() - validatorsList?: InlineResponse20014Validators[] | null; + validatorsList?: InlineResponse20041Validators[] | null; @Input() coins?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() @@ -29,7 +29,7 @@ export class DelegateFormDialogComponent implements OnInit { @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - validator?: InlineResponse20014Validators | null; + validator?: InlineResponse20041Validators | null; @Output() appSubmit: EventEmitter; diff --git a/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts index 764010019..1ecc99482 100644 --- a/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { InlineResponse20038, - InlineResponse20014Validators, + InlineResponse20041Validators, CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod, } from '@cosmos-client/core/esm/openapi/api'; @@ -16,7 +16,7 @@ import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.mode }) export class DelegateMenuDialogComponent implements OnInit { @Input() - selectedValidator?: InlineResponse20014Validators | null; + selectedValidator?: InlineResponse20041Validators | null; @Input() currentStoredWallet?: StoredWallet | null; @Input() @@ -32,17 +32,17 @@ export class DelegateMenuDialogComponent implements OnInit { @Input() isValidator?: boolean | null; @Output() - appDelegate: EventEmitter; + appDelegate: EventEmitter; @Output() - appRedelegate: EventEmitter; + appRedelegate: EventEmitter; @Output() - appUndelegate: EventEmitter; + appUndelegate: EventEmitter; @Output() - appWithdrawDelegatorReward: EventEmitter; + appWithdrawDelegatorReward: EventEmitter; @Output() - appWithdrawValidatorCommission: EventEmitter; + appWithdrawValidatorCommission: EventEmitter; @Output() - appDetail: EventEmitter; + appDetail: EventEmitter; constructor() { this.appDelegate = new EventEmitter(); diff --git a/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index bc94e8af2..ac46613d3 100644 --- a/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { InlineResponse20038, - InlineResponse20014Validators, + InlineResponse20041Validators, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -11,7 +11,7 @@ export type RedelegateOnSubmitEvent = { destinationValidator: string; amount: proto.cosmos.base.v1beta1.ICoin; minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - validatorList: InlineResponse20014Validators[]; + validatorList: InlineResponse20041Validators[]; gasRatio: number; }; @@ -22,7 +22,7 @@ export type RedelegateOnSubmitEvent = { }) export class RedelegateFormDialogComponent implements OnInit { @Input() - validatorsList?: InlineResponse20014Validators[] | null; + validatorsList?: InlineResponse20041Validators[] | null; @Input() currentStoredWallet?: StoredWallet | null; @Input() @@ -36,7 +36,7 @@ export class RedelegateFormDialogComponent implements OnInit { @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - validator?: InlineResponse20014Validators | null; + validator?: InlineResponse20041Validators | null; @Output() appSubmit: EventEmitter; @@ -44,7 +44,7 @@ export class RedelegateFormDialogComponent implements OnInit { selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; availableDenoms?: string[]; selectedAmount?: proto.cosmos.base.v1beta1.ICoin; - selectedValidator?: InlineResponse20014Validators; + selectedValidator?: InlineResponse20041Validators; gasRatio: number; constructor() { @@ -79,7 +79,7 @@ export class RedelegateFormDialogComponent implements OnInit { } onSubmit(minimumGasPrice: string) { - if (!this.selectedValidator || !this.selectedValidator.address) { + if (!this.selectedValidator || !this.selectedValidator.operator_address) { return; } if (!this.selectedAmount) { @@ -93,7 +93,7 @@ export class RedelegateFormDialogComponent implements OnInit { } this.selectedAmount.amount = this.selectedAmount.amount?.toString(); this.appSubmit.emit({ - destinationValidator: this.selectedValidator.address, + destinationValidator: this.selectedValidator.operator_address, amount: this.selectedAmount, minimumGasPrice: this.selectedGasPrice, validatorList: this.validatorsList, diff --git a/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts index c013283f7..521775fee 100644 --- a/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts @@ -2,8 +2,8 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { InlineResponse20038, - InlineResponse20072, - InlineResponse20014Validators, + InlineResponse20047, + InlineResponse20041Validators, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -33,9 +33,9 @@ export class UndelegateFormDialogComponent implements OnInit { @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - unbondingDelegation?: InlineResponse20072 | null; + unbondingDelegation?: InlineResponse20047 | null; @Input() - validator?: InlineResponse20014Validators | null; + validator?: InlineResponse20041Validators | null; @Output() appSubmit: EventEmitter; diff --git a/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts index 0bab2d68c..ceedb28dc 100644 --- a/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts @@ -1,9 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; -import { - InlineResponse20038, - InlineResponse20014Validators, -} from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -23,7 +20,7 @@ export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - validator?: InlineResponse20014Validators | null; + validator?: InlineResponse20041Validators | null; @Output() appSubmit: EventEmitter; diff --git a/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts index 6fe7f1943..0ef154d0b 100644 --- a/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts @@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { proto } from '@cosmos-client/core'; import { InlineResponse20038, - InlineResponse20014Validators, + InlineResponse20041Validators, } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -23,7 +23,7 @@ export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - validator?: InlineResponse20014Validators | null; + validator?: InlineResponse20041Validators | null; @Output() appSubmit: EventEmitter; From 20d30a48277b1559be24d8d17d054e8e38d85ae1 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Wed, 22 Jun 2022 16:38:33 +0900 Subject: [PATCH 18/77] fix: config.js for new alpha-test chain-id: ununifi-alpha-test-v2 --- .../ununifi-alpha-test/firebase-hosting/config.js | 4 ++-- projects/explorer/src/assets/config.js | 10 +++++----- .../ununifi-alpha-test/firebase-hosting/config.js | 4 ++-- projects/marketplace/src/assets/config.js | 10 +++++----- .../ununifi-alpha-test/firebase-hosting/config.js | 4 ++-- projects/portal/src/assets/config.js | 10 +++++----- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/projects/explorer/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js b/projects/explorer/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js index eb7011212..9d07f76a2 100644 --- a/projects/explorer/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js +++ b/projects/explorer/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js @@ -6,9 +6,9 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004; const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006; const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008; -const domainCauchyEA = 'ununifi-alpha-test-v1.cauchye.net'; +const domainCauchyEA = 'ununifi-alpha-test-v2.cauchye.net'; -const chainID = 'ununifi-alpha-test-v1'; +const chainID = 'ununifi-alpha-test-v2'; const chainName = 'UnUniFi (alpha-test)'; const bech32Prefix = { diff --git a/projects/explorer/src/assets/config.js b/projects/explorer/src/assets/config.js index 0501ee6a6..b6e3d7262 100644 --- a/projects/explorer/src/assets/config.js +++ b/projects/explorer/src/assets/config.js @@ -6,12 +6,12 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004; const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006; const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008; -const domainCauchyEA = 'ununifi-alpha-test-v1.cauchye.net'; -const domainCauchyEB = 'ununifi-alpha-test-v1.cauchye.net'; -const domainCauchyEC = 'ununifi-alpha-test-v1.cauchye.net'; -const domainCauchyED = 'ununifi-alpha-test-v1.cauchye.net'; +const domainCauchyEA = 'ununifi-alpha-test-v2.cauchye.net'; +const domainCauchyEB = 'ununifi-alpha-test-v2.cauchye.net'; +const domainCauchyEC = 'ununifi-alpha-test-v2.cauchye.net'; +const domainCauchyED = 'ununifi-alpha-test-v2.cauchye.net'; -const chainID = 'ununifi-alpha-test-v1' +const chainID = 'ununifi-alpha-test-v2' const chainName = 'UnUniFi (alpha-test)'; const bech32Prefix = { diff --git a/projects/marketplace/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js b/projects/marketplace/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js index 3f41c8262..13d0ee8c4 100644 --- a/projects/marketplace/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js +++ b/projects/marketplace/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js @@ -6,9 +6,9 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004; const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006; const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008; -const domainCauchyEA = 'ununifi-alpha-test-v1.cauchye.net'; +const domainCauchyEA = 'ununifi-alpha-test-v2.cauchye.net'; -const chainID = 'ununifi-alpha-test-v1'; +const chainID = 'ununifi-alpha-test-v2'; const chainName = 'UnUnuFi (alpha-test)'; const bech32Prefix = { diff --git a/projects/marketplace/src/assets/config.js b/projects/marketplace/src/assets/config.js index 2f701420f..8cdbb2ee8 100644 --- a/projects/marketplace/src/assets/config.js +++ b/projects/marketplace/src/assets/config.js @@ -6,12 +6,12 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004; const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006; const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008; -const domainCauchyEA = 'ununifi-alpha-test-v1.cauchye.net'; -const domainCauchyEB = 'ununifi-alpha-test-v1.cauchye.net'; -const domainCauchyEC = 'ununifi-alpha-test-v1.cauchye.net'; -const domainCauchyED = 'ununifi-alpha-test-v1.cauchye.net'; +const domainCauchyEA = 'ununifi-alpha-test-v2.cauchye.net'; +const domainCauchyEB = 'ununifi-alpha-test-v2.cauchye.net'; +const domainCauchyEC = 'ununifi-alpha-test-v2.cauchye.net'; +const domainCauchyED = 'ununifi-alpha-test-v2.cauchye.net'; -const chainID = 'ununifi-alpha-test-v1'; +const chainID = 'ununifi-alpha-test-v2'; const chainName = 'UnUniFi (alpha-test)'; const bech32Prefix = { diff --git a/projects/portal/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js b/projects/portal/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js index eb7011212..9d07f76a2 100644 --- a/projects/portal/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js +++ b/projects/portal/editions/ununifi/launch/ununifi-alpha-test/firebase-hosting/config.js @@ -6,9 +6,9 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004; const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006; const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008; -const domainCauchyEA = 'ununifi-alpha-test-v1.cauchye.net'; +const domainCauchyEA = 'ununifi-alpha-test-v2.cauchye.net'; -const chainID = 'ununifi-alpha-test-v1'; +const chainID = 'ununifi-alpha-test-v2'; const chainName = 'UnUniFi (alpha-test)'; const bech32Prefix = { diff --git a/projects/portal/src/assets/config.js b/projects/portal/src/assets/config.js index fc91a29d9..3db5671f2 100644 --- a/projects/portal/src/assets/config.js +++ b/projects/portal/src/assets/config.js @@ -6,12 +6,12 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004; const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006; const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008; -const domainCauchyEA = 'ununifi-alpha-test-v1.cauchye.net'; -const domainCauchyEB = 'ununifi-alpha-test-v1.cauchye.net'; -const domainCauchyEC = 'ununifi-alpha-test-v1.cauchye.net'; -const domainCauchyED = 'ununifi-alpha-test-v1.cauchye.net'; +const domainCauchyEA = 'ununifi-alpha-test-v2.cauchye.net'; +const domainCauchyEB = 'ununifi-alpha-test-v2.cauchye.net'; +const domainCauchyEC = 'ununifi-alpha-test-v2.cauchye.net'; +const domainCauchyED = 'ununifi-alpha-test-v2.cauchye.net'; -const chainID = 'ununifi-alpha-test-v1' +const chainID = 'ununifi-alpha-test-v2' const chainName = 'UnUniFi (alpha-test)'; const bech32Prefix = { From dd9226413284c6d2877b9ef8275fc098ea3ccd09 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Wed, 22 Jun 2022 18:50:10 +0900 Subject: [PATCH 19/77] fix: error in tx details messages --- projects/explorer/src/app/views/txs/tx/tx.component.html | 2 +- projects/explorer/src/app/views/txs/tx/tx.component.ts | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/projects/explorer/src/app/views/txs/tx/tx.component.html b/projects/explorer/src/app/views/txs/tx/tx.component.html index d2fd02965..067513d48 100644 --- a/projects/explorer/src/app/views/txs/tx/tx.component.html +++ b/projects/explorer/src/app/views/txs/tx/tx.component.html @@ -54,7 +54,7 @@

Transaction

Messages

- + diff --git a/projects/explorer/src/app/views/txs/tx/tx.component.ts b/projects/explorer/src/app/views/txs/tx/tx.component.ts index 90ab3cda1..b5358a912 100644 --- a/projects/explorer/src/app/views/txs/tx/tx.component.ts +++ b/projects/explorer/src/app/views/txs/tx/tx.component.ts @@ -18,14 +18,6 @@ export class TxComponent implements OnInit { ngOnInit(): void {} - unpackMsg(value: any) { - try { - return cosmosclient.codec.protoJSONToInstance(value); - } catch { - return null; - } - } - unpackKey(value: any) { try { return cosmosclient.codec.protoJSONToInstance(value) as cosmosclient.PubKey; From 9b11b0cfb1da4515421f3f9c4f7c0a3af421952d Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Wed, 22 Jun 2022 19:15:41 +0900 Subject: [PATCH 20/77] fix: to show chain-id with temporal way in portal home page --- .../app/views/balance/balance.component.html | 3 ++- .../app/views/balance/balance.component.ts | 22 ++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/projects/portal/src/app/views/balance/balance.component.html b/projects/portal/src/app/views/balance/balance.component.html index 12e997d90..373bec13b 100644 --- a/projects/portal/src/app/views/balance/balance.component.html +++ b/projects/portal/src/app/views/balance/balance.component.html @@ -127,7 +127,8 @@

Network

Chain ID - {{ nodeInfo.default_node_info?.network }} + + {{ tempNodeInfo.node_info?.network }}
diff --git a/projects/portal/src/app/views/balance/balance.component.ts b/projects/portal/src/app/views/balance/balance.component.ts index 7ebc62533..5236cd1b0 100644 --- a/projects/portal/src/app/views/balance/balance.component.ts +++ b/projects/portal/src/app/views/balance/balance.component.ts @@ -1,6 +1,6 @@ import { WalletType } from '../../models/wallets/wallet.model'; import { Clipboard } from '@angular/cdk/clipboard'; -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, OnChanges } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { proto } from '@cosmos-client/core'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; @@ -10,7 +10,7 @@ import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; templateUrl: './balance.component.html', styleUrls: ['./balance.component.css'], }) -export class ViewBalanceComponent implements OnInit { +export class ViewBalanceComponent implements OnInit, OnChanges { @Input() walletId?: string | null; @Input() walletType?: WalletType | null; @Input() accAddress?: string | null; @@ -29,10 +29,26 @@ export class ViewBalanceComponent implements OnInit { | null; @Input() nodeInfo?: InlineResponse20012 | null; - constructor(private readonly snackBar: MatSnackBar, private clipboard: Clipboard) {} + // Todo: This is temporal fix. + tempNodeInfo: any; + + constructor(private readonly snackBar: MatSnackBar, private clipboard: Clipboard) { + // Todo: This is temporal fix. + this.tempNodeInfo = this.nodeInfo as any; + } ngOnInit(): void {} + // Todo: This lifecycle methods is temporal fix. + // default_node_info in type definition of InlineResponse20012 is actually node_info. + // It should be resolved with UnUniFi/chain or @cosmos-client/core, I guess. + // But this is necessary for user to know which network is connected now. + // So, currently, I convert it as any. + // But this is not good. + ngOnChanges(): void { + this.tempNodeInfo = this.nodeInfo as any; + } + copyClipboard(value: string) { if (value.length > 0) { this.clipboard.copy(value); From d16d832887d5043dd68fe2530f1d4eb3d140c2b3 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Thu, 23 Jun 2022 18:17:43 +0900 Subject: [PATCH 21/77] chore: bumps @cosmos-client/core and ununifi-client to v0.46.0-rc2 --- package-lock.json | 30 +++++++++++++++--------------- package.json | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef1c3fb77..5187f3c23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.46.0-rc1", + "@cosmos-client/core": "^0.46.0-rc2", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -47,7 +47,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.3.0", - "ununifi-client": "^0.46.0-rc1", + "ununifi-client": "^0.46.0-rc2", "zone.js": "~0.11.4" }, "devDependencies": { @@ -3180,9 +3180,9 @@ "dev": true }, "node_modules/@cosmos-client/core": { - "version": "0.46.0-rc1", - "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc1.tgz", - "integrity": "sha512-n5ZxjSgfvkiVzawluz5vZ2Ly1GoenkDLFW4V8ka/rjYhWjlSiMJjtjll5DmCkeDaQ0sjACf/1Tzb0iblCfzT7w==", + "version": "0.46.0-rc2", + "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc2.tgz", + "integrity": "sha512-iXyh/wHNsU1o+4FodAS1hnYlJM52FniJGmcQ4gLOA7soW9t0tW43krE6cJiKJAxeQCyG+iyu/Fhu+694JcSiRg==", "dependencies": { "axios": "^0.23.0", "bech32": "^1.1.4", @@ -40486,15 +40486,15 @@ } }, "node_modules/ununifi-client": { - "version": "0.46.0-rc1", - "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.46.0-rc1.tgz", - "integrity": "sha512-VcxDVG/FfIGxNmB9nL0Rb5fjt+QfsNBunUR5KHk5a7qvN22LendPOLxzFZJ/X4LeyOwW3xPJAzGRvfMS8ZbDcA==", + "version": "0.46.0-rc2", + "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.46.0-rc2.tgz", + "integrity": "sha512-zo4rvV6kWjQCCpnn3O48Tg7lFJway/u4HRj5XTt77NI0SrM5v91to/m38Ae2Zz3G16lJaEyuVKoK9F2sRf+NqA==", "dependencies": { "axios": "^0.21.1", "protobufjs": "^6.11.2" }, "peerDependencies": { - "@cosmos-client/core": "^0.46.0-rc1" + "@cosmos-client/core": "^0.46.0-rc2" } }, "node_modules/ununifi-client/node_modules/axios": { @@ -44372,9 +44372,9 @@ "dev": true }, "@cosmos-client/core": { - "version": "0.46.0-rc1", - "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc1.tgz", - "integrity": "sha512-n5ZxjSgfvkiVzawluz5vZ2Ly1GoenkDLFW4V8ka/rjYhWjlSiMJjtjll5DmCkeDaQ0sjACf/1Tzb0iblCfzT7w==", + "version": "0.46.0-rc2", + "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc2.tgz", + "integrity": "sha512-iXyh/wHNsU1o+4FodAS1hnYlJM52FniJGmcQ4gLOA7soW9t0tW43krE6cJiKJAxeQCyG+iyu/Fhu+694JcSiRg==", "requires": { "axios": "^0.23.0", "bech32": "^1.1.4", @@ -73356,9 +73356,9 @@ "dev": true }, "ununifi-client": { - "version": "0.46.0-rc1", - "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.46.0-rc1.tgz", - "integrity": "sha512-VcxDVG/FfIGxNmB9nL0Rb5fjt+QfsNBunUR5KHk5a7qvN22LendPOLxzFZJ/X4LeyOwW3xPJAzGRvfMS8ZbDcA==", + "version": "0.46.0-rc2", + "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.46.0-rc2.tgz", + "integrity": "sha512-zo4rvV6kWjQCCpnn3O48Tg7lFJway/u4HRj5XTt77NI0SrM5v91to/m38Ae2Zz3G16lJaEyuVKoK9F2sRf+NqA==", "requires": { "axios": "^0.21.1", "protobufjs": "^6.11.2" diff --git a/package.json b/package.json index 7a195739e..2d5ab7cf2 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.46.0-rc1", + "@cosmos-client/core": "^0.46.0-rc2", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -78,7 +78,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.3.0", - "ununifi-client": "^0.46.0-rc1", + "ununifi-client": "^0.46.0-rc2", "zone.js": "~0.11.4" }, "devDependencies": { From f85a83384cfa9e23c2b6ab38d25f90e773376369 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Fri, 24 Jun 2022 17:15:27 +0900 Subject: [PATCH 22/77] feat: disable metamask related feature --- projects/portal/src/app/models/cosmos/tx-common.service.ts | 4 +++- .../src/app/models/wallets/wallet.application.service.ts | 5 ++++- .../src/lib/models/cosmos/tx/common/tx-common.service.ts | 4 +++- .../src/lib/models/wallets/wallet.application.service.ts | 5 ++++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/projects/portal/src/app/models/cosmos/tx-common.service.ts b/projects/portal/src/app/models/cosmos/tx-common.service.ts index 0179a8a73..ce887a898 100644 --- a/projects/portal/src/app/models/cosmos/tx-common.service.ts +++ b/projects/portal/src/app/models/cosmos/tx-common.service.ts @@ -146,7 +146,9 @@ export class TxCommonService { return this.signTxWithKeyStation(txBuilder, signerBaseAccount); } if (currentCosmosWallet.type === WalletType.metaMask) { - return this.signTxWithMetaMask(txBuilder, signerBaseAccount); + // Todo: Currently disabled MetaMask related features. + throw Error('Unsupported wallet type!'); + // return this.signTxWithMetaMask(txBuilder, signerBaseAccount); } throw Error('Unsupported wallet type!'); } diff --git a/projects/portal/src/app/models/wallets/wallet.application.service.ts b/projects/portal/src/app/models/wallets/wallet.application.service.ts index 0db2f24ae..850f6c6fe 100644 --- a/projects/portal/src/app/models/wallets/wallet.application.service.ts +++ b/projects/portal/src/app/models/wallets/wallet.application.service.ts @@ -94,8 +94,11 @@ export class WalletApplicationService { } if (selectedWalletType === WalletType.metaMask) { - await this.metaMaskConnectWallet(); + // Todo: Currently disabled MetaMask related features. + this.snackBar.open('Selected Wallet is not supported yet!', 'Close'); return; + // await this.metaMaskConnectWallet(); + // return; } this.snackBar.open('Invalid wallet type!', 'Close'); diff --git a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts index 273ae60eb..4e1a4a315 100644 --- a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts +++ b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts @@ -141,7 +141,9 @@ export class TxCommonService { return this.signTxWithKeyStation(txBuilder, signerBaseAccount); } if (currentCosmosWallet.type === WalletType.metaMask) { - return this.signTxWithMetaMask(txBuilder, signerBaseAccount); + // Todo: Currently disabled MetaMask related features. + throw Error('Unsupported wallet type!'); + // return this.signTxWithMetaMask(txBuilder, signerBaseAccount); } throw Error('Unsupported wallet type!'); } diff --git a/projects/shared/src/lib/models/wallets/wallet.application.service.ts b/projects/shared/src/lib/models/wallets/wallet.application.service.ts index 2df7e878c..02f46fcae 100644 --- a/projects/shared/src/lib/models/wallets/wallet.application.service.ts +++ b/projects/shared/src/lib/models/wallets/wallet.application.service.ts @@ -55,8 +55,11 @@ export class WalletApplicationService { } if (selectedWalletType === WalletType.metaMask) { - await this.metaMaskConnectWallet(); + // Todo: Currently disabled MetaMask related features. + this.snackBar.open('Selected Wallet is not supported yet!', 'Close'); return; + // await this.metaMaskConnectWallet(); + // return; } this.snackBar.open('Invalid wallet type!', 'Close'); From d3f268ef66e1989d2799f7e3867467f0dd2a2c19 Mon Sep 17 00:00:00 2001 From: taro04 Date: Tue, 28 Jun 2022 21:38:14 +0900 Subject: [PATCH 23/77] feat: update cosmos sdk 0.46.0-rc5 only expolorer --- package-lock.json | 29 ++++++++++++++----- package.json | 2 +- projects/explorer/src/app/app.component.ts | 8 ++--- .../src/app/models/cosmos-sdk.service.ts | 2 +- .../src/app/models/cosmos/tx-common.model.ts | 8 ++--- .../app/models/cosmos/tx-common.service.ts | 16 +++++----- .../accounts/account/account.component.ts | 14 ++++----- .../accounts/account/txs/txs.component.ts | 10 +++---- .../app/pages/blocks/block/block.component.ts | 10 +++---- .../src/app/pages/blocks/blocks.component.ts | 8 ++--- .../dashboard/blocks/blocks.component.ts | 8 ++--- .../pages/dashboard/dashboard.component.ts | 12 ++++---- .../app/pages/dashboard/txs/txs.component.ts | 12 ++++---- .../validators/validators.component.ts | 6 ++-- .../src/app/pages/home/bank/bank.component.ts | 6 ++-- .../app/pages/home/blocks/blocks.component.ts | 8 ++--- .../distribution/distribution.component.ts | 6 ++-- .../src/app/pages/home/home.component.ts | 10 +++---- .../src/app/pages/home/mint/mint.component.ts | 8 ++--- .../src/app/pages/home/txs/txs.component.ts | 8 ++--- .../proposals/proposal/proposal.component.ts | 18 ++++++------ .../pages/proposals/proposals.component.ts | 8 ++--- .../src/app/pages/txs/tx/tx.component.ts | 6 ++-- .../src/app/pages/txs/txs.component.ts | 12 ++++---- .../validator/validator.component.ts | 6 ++-- .../pages/validators/validators.component.ts | 6 ++-- .../accounts/account/account.component.ts | 24 +++++++-------- .../validator/validator.component.ts | 6 ++-- .../tx-fee-confirm-dialog.component.ts | 8 ++--- .../proposals/proposal/proposal.component.ts | 6 ++-- .../views/proposals/proposals.component.ts | 6 ++-- .../src/app/views/txs/tx/tx.component.ts | 6 ++-- .../validator/validator.component.ts | 6 ++-- 33 files changed, 162 insertions(+), 147 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5187f3c23..558f7ab7e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.46.0-rc2", + "@cosmos-client/core": "^0.46.0-rc5", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -3180,14 +3180,15 @@ "dev": true }, "node_modules/@cosmos-client/core": { - "version": "0.46.0-rc2", - "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc2.tgz", - "integrity": "sha512-iXyh/wHNsU1o+4FodAS1hnYlJM52FniJGmcQ4gLOA7soW9t0tW43krE6cJiKJAxeQCyG+iyu/Fhu+694JcSiRg==", + "version": "0.46.0-rc5", + "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc5.tgz", + "integrity": "sha512-q9Y8iMZGwdVJnFORfs1EXwPbi6SpPE712IEgDqczNYNVVwhTkYTqqosPVQl29eQLCY7lTAxlCNRyRW3b8ZR3yw==", "dependencies": { "axios": "^0.23.0", "bech32": "^1.1.4", "bip32": "^2.0.6", "bip39": "^3.0.4", + "process": "^0.11.10", "protobufjs": "^6.11.2", "rxjs": "^7.4.0", "secp256k1": "^4.0.2", @@ -36650,6 +36651,14 @@ "node": ">= 0.8" } }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -44372,14 +44381,15 @@ "dev": true }, "@cosmos-client/core": { - "version": "0.46.0-rc2", - "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc2.tgz", - "integrity": "sha512-iXyh/wHNsU1o+4FodAS1hnYlJM52FniJGmcQ4gLOA7soW9t0tW43krE6cJiKJAxeQCyG+iyu/Fhu+694JcSiRg==", + "version": "0.46.0-rc5", + "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc5.tgz", + "integrity": "sha512-q9Y8iMZGwdVJnFORfs1EXwPbi6SpPE712IEgDqczNYNVVwhTkYTqqosPVQl29eQLCY7lTAxlCNRyRW3b8ZR3yw==", "requires": { "axios": "^0.23.0", "bech32": "^1.1.4", "bip32": "^2.0.6", "bip39": "^3.0.4", + "process": "^0.11.10", "protobufjs": "^6.11.2", "rxjs": "^7.4.0", "secp256k1": "^4.0.2", @@ -70378,6 +70388,11 @@ "integrity": "sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", "dev": true }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==" + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", diff --git a/package.json b/package.json index 2d5ab7cf2..c703f9e63 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.46.0-rc2", + "@cosmos-client/core": "^0.46.0-rc5", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", diff --git a/projects/explorer/src/app/app.component.ts b/projects/explorer/src/app/app.component.ts index e15e86938..536ea336a 100644 --- a/projects/explorer/src/app/app.component.ts +++ b/projects/explorer/src/app/app.component.ts @@ -3,7 +3,7 @@ import { CosmosSDKService } from './models/cosmos-sdk.service'; import { SearchResult } from './views/toolbar/toolbar.component'; import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; -import { cosmosclient, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable, BehaviorSubject, of } from 'rxjs'; import { mergeMap, map } from 'rxjs/operators'; @@ -91,7 +91,7 @@ export class AppComponent implements OnInit { return of(false); } try { - return rest.tendermint.getLatestBlock(sdk.rest).then((res) => { + return cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => { return res.data && res.data.block?.header?.height && BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) @@ -135,7 +135,7 @@ export class AppComponent implements OnInit { return of(false); } try { - const tx = rest.tx + const tx = cosmosclient.rest.tx .getTx(sdk.rest, searchBoxInputValue) .then((res) => { console.log(res); @@ -218,5 +218,5 @@ export class AppComponent implements OnInit { this.configS.setCurrentConfig(value); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/explorer/src/app/models/cosmos-sdk.service.ts b/projects/explorer/src/app/models/cosmos-sdk.service.ts index 2acec7f81..7c650674a 100644 --- a/projects/explorer/src/app/models/cosmos-sdk.service.ts +++ b/projects/explorer/src/app/models/cosmos-sdk.service.ts @@ -1,6 +1,6 @@ import { Config, ConfigService } from './config.service'; import { Injectable } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable } from 'rxjs'; import { first, map } from 'rxjs/operators'; diff --git a/projects/explorer/src/app/models/cosmos/tx-common.model.ts b/projects/explorer/src/app/models/cosmos/tx-common.model.ts index 91a756def..300669e0a 100644 --- a/projects/explorer/src/app/models/cosmos/tx-common.model.ts +++ b/projects/explorer/src/app/models/cosmos/tx-common.model.ts @@ -1,9 +1,9 @@ -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20049 } from '@cosmos-client/core/esm/openapi'; export type SimulatedTxResultResponse = { simulatedResultData: InlineResponse20049; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - estimatedGasUsedWithMargin: proto.cosmos.base.v1beta1.ICoin; - estimatedFeeWithMargin: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + estimatedGasUsedWithMargin: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + estimatedFeeWithMargin: cosmosclient.proto.cosmos.base.v1beta1.ICoin; }; diff --git a/projects/explorer/src/app/models/cosmos/tx-common.service.ts b/projects/explorer/src/app/models/cosmos/tx-common.service.ts index bd95381a2..5af84da8f 100644 --- a/projects/explorer/src/app/models/cosmos/tx-common.service.ts +++ b/projects/explorer/src/app/models/cosmos/tx-common.service.ts @@ -1,29 +1,29 @@ import { CosmosSDKService } from '../cosmos-sdk.service'; import { SimulatedTxResultResponse } from './tx-common.model'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; @Injectable({ providedIn: 'root', }) export class TxCommonService { - constructor(private readonly cosmosSDK: CosmosSDKService) {} + constructor(private readonly cosmosSDK: CosmosSDKService) { } async simulateTx( txBuilder: cosmosclient.TxBuilder, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); - // restore json from txBuilder - const txForSimulation = JSON.parse(txBuilder.cosmosJSONStringify()); + // cosmosclient.rest ore json from txBuilder + const txForSimulation = JSON.parse(txBuilder.protoJSONStringify()); // fix JSONstringify issue delete txForSimulation.auth_info.signer_infos[0].mode_info.multi; // simulate - const simulatedResult = await rest.tx.simulate(sdk, { + const simulatedResult = await cosmosclient.rest.tx.simulate(sdk, { tx: txForSimulation, tx_bytes: txBuilder.txBytes(), }); @@ -66,9 +66,9 @@ export class TxCommonService { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); // broadcast tx - const result = await rest.tx.broadcastTx(sdk, { + const result = await cosmosclient.rest.tx.broadcastTx(sdk, { tx_bytes: txBuilder.txBytes(), - mode: rest.tx.BroadcastTxMode.Block, + mode: cosmosclient.rest.tx.BroadcastTxMode.Block, }); window.alert(`Copy the following txHash for AirDrop!\n${result.data.tx_response?.txhash}`); diff --git a/projects/explorer/src/app/pages/accounts/account/account.component.ts b/projects/explorer/src/app/pages/accounts/account/account.component.ts index c16cd374b..fcf80f551 100644 --- a/projects/explorer/src/app/pages/accounts/account/account.component.ts +++ b/projects/explorer/src/app/pages/accounts/account/account.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, rest, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable, of } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -14,12 +14,12 @@ import { map, mergeMap } from 'rxjs/operators'; export class AccountComponent implements OnInit { address$: Observable; account$: Observable< - | proto.cosmos.auth.v1beta1.BaseAccount - | proto.cosmos.vesting.v1beta1.ContinuousVestingAccount + | cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount | unknown | undefined >; - balances$: Observable; + balances$: Observable; constructor( private route: ActivatedRoute, @@ -47,7 +47,7 @@ export class AccountComponent implements OnInit { if (address === undefined) { return of(undefined); } - return rest.auth + return cosmosclient.rest.auth .account(sdk.rest, address) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -66,10 +66,10 @@ export class AccountComponent implements OnInit { if (address === undefined) { return of([]); } - return rest.bank.allBalances(sdk.rest, address).then((res) => res.data.balances || []); + return cosmosclient.rest.bank.allBalances(sdk.rest, address).then((res) => res.data.balances || []); }), ); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/explorer/src/app/pages/accounts/account/txs/txs.component.ts b/projects/explorer/src/app/pages/accounts/account/txs/txs.component.ts index c78c2ef86..0d7a3e29a 100644 --- a/projects/explorer/src/app/pages/accounts/account/txs/txs.component.ts +++ b/projects/explorer/src/app/pages/accounts/account/txs/txs.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosTxV1beta1GetTxsEventResponse } from '@cosmos-client/core/esm/openapi'; import { of, combineLatest, Observable } from 'rxjs'; import { map, mergeMap, switchMap, distinctUntilChanged, withLatestFrom } from 'rxjs/operators'; @@ -42,7 +42,7 @@ export class TxsComponent implements OnInit { this.txs$ = combineLatest([sdk$, this.address$]).pipe( mergeMap(([sdk, address]) => { - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.sender='${address}'`], @@ -61,7 +61,7 @@ export class TxsComponent implements OnInit { this.txsTotalCount$ = combineLatest([sdk$, this.address$]).pipe( mergeMap(([sdk, address]) => { - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.sender='${address}'`], @@ -121,7 +121,7 @@ export class TxsComponent implements OnInit { return []; } - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.sender='${address}'`], @@ -163,7 +163,7 @@ export class TxsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } appPaginationChanged(pageEvent: PageEvent): void { this.router.navigate([], { diff --git a/projects/explorer/src/app/pages/blocks/block/block.component.ts b/projects/explorer/src/app/pages/blocks/block/block.component.ts index 3d94e2e06..6157dc8eb 100644 --- a/projects/explorer/src/app/pages/blocks/block/block.component.ts +++ b/projects/explorer/src/app/pages/blocks/block/block.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; import { CosmosTxV1beta1GetTxsEventResponse } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; @@ -25,14 +25,14 @@ export class BlockComponent implements OnInit { this.blockHeight$ = this.route.params.pipe(map((params) => params.block_height)); this.block$ = combineLatest([this.cosmosSDK.sdk$, this.blockHeight$]).pipe( mergeMap(([sdk, height]) => - rest.tendermint.getBlockByHeight(sdk.rest, BigInt(height)).then((res) => res.data), + cosmosclient.rest.tendermint.getBlockByHeight(sdk.rest, BigInt(height)).then((res) => res.data), ), ); this.txs$ = combineLatest([this.cosmosSDK.sdk$, this.blockHeight$, this.block$]).pipe( filter(([sdk, height, block]) => (block.block?.data?.txs?.length || 0) > 0), mergeMap(([sdk, height, block]) => - rest.tx + cosmosclient.rest.tx .getTxsEvent(sdk.rest, [`tx.height=${height}`], undefined, undefined, undefined, true) .then((res) => { console.log('res', res); @@ -69,7 +69,7 @@ export class BlockComponent implements OnInit { ); this.latestBlockHeight$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), map((block) => block.block?.header?.height || ''), ); @@ -90,5 +90,5 @@ export class BlockComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/explorer/src/app/pages/blocks/blocks.component.ts b/projects/explorer/src/app/pages/blocks/blocks.component.ts index ef33ad6ab..4807af013 100644 --- a/projects/explorer/src/app/pages/blocks/blocks.component.ts +++ b/projects/explorer/src/app/pages/blocks/blocks.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20010, InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer, combineLatest, BehaviorSubject } from 'rxjs'; @@ -44,7 +44,7 @@ export class BlocksComponent implements OnInit { ); this.latestBlock$ = combineLatest([timerWithEnable$, this.cosmosSDK.sdk$]).pipe( - mergeMap(([n, sdk]) => rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), + mergeMap(([n, sdk]) => cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), ); this.latestBlockHeight$ = this.latestBlock$.pipe( @@ -119,7 +119,7 @@ export class BlocksComponent implements OnInit { ...blockHeights.map((blockHeight) => this.cosmosSDK.sdk$.pipe( mergeMap((sdk) => - rest.tendermint.getBlockByHeight(sdk.rest, blockHeight).then((res) => res.data), + cosmosclient.rest.tendermint.getBlockByHeight(sdk.rest, blockHeight).then((res) => res.data), ), ), ), @@ -132,7 +132,7 @@ export class BlocksComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } appPaginationChanged(pageEvent: PageEvent): void { this.router.navigate([], { diff --git a/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts b/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts index ef33ad6ab..4807af013 100644 --- a/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts +++ b/projects/explorer/src/app/pages/dashboard/blocks/blocks.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20010, InlineResponse20011 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer, combineLatest, BehaviorSubject } from 'rxjs'; @@ -44,7 +44,7 @@ export class BlocksComponent implements OnInit { ); this.latestBlock$ = combineLatest([timerWithEnable$, this.cosmosSDK.sdk$]).pipe( - mergeMap(([n, sdk]) => rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), + mergeMap(([n, sdk]) => cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), ); this.latestBlockHeight$ = this.latestBlock$.pipe( @@ -119,7 +119,7 @@ export class BlocksComponent implements OnInit { ...blockHeights.map((blockHeight) => this.cosmosSDK.sdk$.pipe( mergeMap((sdk) => - rest.tendermint.getBlockByHeight(sdk.rest, blockHeight).then((res) => res.data), + cosmosclient.rest.tendermint.getBlockByHeight(sdk.rest, blockHeight).then((res) => res.data), ), ), ), @@ -132,7 +132,7 @@ export class BlocksComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } appPaginationChanged(pageEvent: PageEvent): void { this.router.navigate([], { diff --git a/projects/explorer/src/app/pages/dashboard/dashboard.component.ts b/projects/explorer/src/app/pages/dashboard/dashboard.component.ts index 3130e5e6d..4ee9a01e5 100644 --- a/projects/explorer/src/app/pages/dashboard/dashboard.component.ts +++ b/projects/explorer/src/app/pages/dashboard/dashboard.component.ts @@ -1,6 +1,6 @@ import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20010 } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable, of, timer } from 'rxjs'; import { catchError, map, mergeMap } from 'rxjs/operators'; @@ -24,7 +24,7 @@ export class DashboardComponent implements OnInit { // eslint-disable-next-line no-unused-vars const sdk$ = timer$.pipe(mergeMap((_) => this.cosmosSDK.sdk$)); this.latestBlock$ = sdk$.pipe( - mergeMap((sdk) => rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), ); this.latestBlockHeight$ = this.latestBlock$.pipe( map((latestBlock) => @@ -37,12 +37,12 @@ export class DashboardComponent implements OnInit { ); this.totalSupply$ = sdk$.pipe( - mergeMap((sdk) => rest.bank.totalSupply(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.bank.totalSupply(sdk.rest).then((res) => res.data)), map((sdk) => Number(sdk.supply?.find((supply) => supply.denom == 'uguu')?.amount)), ); this.stakedTokens$ = sdk$.pipe( - mergeMap((sdk) => rest.staking.pool(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.staking.pool(sdk.rest).then((res) => res.data)), map((res) => Number(res.pool?.bonded_tokens) + Number(res.pool?.not_bonded_tokens)), ); @@ -51,10 +51,10 @@ export class DashboardComponent implements OnInit { ); this.inflation$ = sdk$.pipe( - mergeMap((sdk) => rest.mint.inflation(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.mint.inflation(sdk.rest).then((res) => res.data)), map((res) => (Number(res.inflation) * 100).toFixed(2)), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/explorer/src/app/pages/dashboard/txs/txs.component.ts b/projects/explorer/src/app/pages/dashboard/txs/txs.component.ts index df2ae4c7f..dde0f9834 100644 --- a/projects/explorer/src/app/pages/dashboard/txs/txs.component.ts +++ b/projects/explorer/src/app/pages/dashboard/txs/txs.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/explorer/src/app/models/config.service'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; @@ -60,7 +60,7 @@ export class TxsComponent implements OnInit { this.txsTotalCount$ = combineLatest([sdk$, this.selectedTxTypeChanged$]).pipe( switchMap(([sdk, selectedTxType]) => { - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.module='${selectedTxType}'`], @@ -119,8 +119,8 @@ export class TxsComponent implements OnInit { // Note: This is strange. This is temporary workaround way. const temporaryWorkaroundPageSize = txsTotalCount === BigInt(1) && - modifiedPageOffset === BigInt(1) && - modifiedPageSize === BigInt(1) + modifiedPageOffset === BigInt(1) && + modifiedPageSize === BigInt(1) ? modifiedPageSize + BigInt(1) : modifiedPageSize; @@ -128,7 +128,7 @@ export class TxsComponent implements OnInit { return of([]); } - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.module='${selectedTxType}'`], @@ -148,7 +148,7 @@ export class TxsComponent implements OnInit { this.txs$.subscribe((a) => console.log(a)); } - ngOnInit(): void {} + ngOnInit(): void { } appSelectedTxTypeChanged(selectedTxType: string): void { this.router.navigate([], { diff --git a/projects/explorer/src/app/pages/dashboard/validators/validators.component.ts b/projects/explorer/src/app/pages/dashboard/validators/validators.component.ts index f83599f19..194711d47 100644 --- a/projects/explorer/src/app/pages/dashboard/validators/validators.component.ts +++ b/projects/explorer/src/app/pages/dashboard/validators/validators.component.ts @@ -4,7 +4,7 @@ import { validatorWithShareType, } from '../../../views/dashboard/validators/validators.component'; import { Component, OnInit } from '@angular/core'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod } from '@cosmos-client/core/esm/openapi'; import { Observable, BehaviorSubject, combineLatest } from 'rxjs'; import { map, mergeMap, withLatestFrom } from 'rxjs/operators'; @@ -24,7 +24,7 @@ export class ValidatorsComponent implements OnInit { constructor(private cosmosSDK: CosmosSDKService) { this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.staking.validators(sdk.rest)), + mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), map((result) => result.data), ); @@ -82,7 +82,7 @@ export class ValidatorsComponent implements OnInit { ); } - ngOnInit() {} + ngOnInit() { } onToggleChange(value: boolean) { this.activeEnabled.next(value); diff --git a/projects/explorer/src/app/pages/home/bank/bank.component.ts b/projects/explorer/src/app/pages/home/bank/bank.component.ts index 8e329d559..086161f91 100644 --- a/projects/explorer/src/app/pages/home/bank/bank.component.ts +++ b/projects/explorer/src/app/pages/home/bank/bank.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { QueryTotalSupplyResponseIsTheResponseTypeForTheQueryTotalSupplyRPCMethod } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { combineLatest, Observable, timer } from 'rxjs'; @@ -21,9 +21,9 @@ export class BankComponent implements OnInit { const timer$ = timer(0, 60 * 60 * 1000); const combined$ = combineLatest([timer$, this.cosmosSDK.sdk$]).pipe(map(([_, sdk]) => sdk)); this.totalSupply$ = combined$.pipe( - mergeMap((sdk) => rest.bank.totalSupply(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.bank.totalSupply(sdk.rest).then((res) => res.data)), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/explorer/src/app/pages/home/blocks/blocks.component.ts b/projects/explorer/src/app/pages/home/blocks/blocks.component.ts index 37b4fff70..907abed39 100644 --- a/projects/explorer/src/app/pages/home/blocks/blocks.component.ts +++ b/projects/explorer/src/app/pages/home/blocks/blocks.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20011, InlineResponse20010 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer } from 'rxjs'; @@ -23,7 +23,7 @@ export class BlocksComponent implements OnInit { // eslint-disable-next-line no-unused-vars const sdk$ = timer$.pipe(mergeMap((_) => this.cosmosSDK.sdk$)); this.latestBlock$ = sdk$.pipe( - mergeMap((sdk) => rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), ); this.latestBlockHeight$ = this.latestBlock$.pipe( // eslint-disable-next-line no-undef @@ -51,7 +51,7 @@ export class BlocksComponent implements OnInit { ...blockHeights.map((blockHeight) => this.cosmosSDK.sdk$.pipe( mergeMap((sdk) => - rest.tendermint.getBlockByHeight(sdk.rest, blockHeight).then((res) => res.data), + cosmosclient.rest.tendermint.getBlockByHeight(sdk.rest, blockHeight).then((res) => res.data), ), ), ), @@ -65,5 +65,5 @@ export class BlocksComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/explorer/src/app/pages/home/distribution/distribution.component.ts b/projects/explorer/src/app/pages/home/distribution/distribution.component.ts index 41c269f69..afc89ec94 100644 --- a/projects/explorer/src/app/pages/home/distribution/distribution.component.ts +++ b/projects/explorer/src/app/pages/home/distribution/distribution.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosDistributionV1beta1QueryCommunityPoolResponse } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; import { Observable } from 'rxjs'; @@ -19,9 +19,9 @@ export class DistributionComponent implements OnInit { private readonly cosmosSDK: CosmosSDKService, ) { this.communityPool$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.distribution.communityPool(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.distribution.communityPool(sdk.rest).then((res) => res.data)), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/explorer/src/app/pages/home/home.component.ts b/projects/explorer/src/app/pages/home/home.component.ts index 9803819c4..34fe1ac60 100644 --- a/projects/explorer/src/app/pages/home/home.component.ts +++ b/projects/explorer/src/app/pages/home/home.component.ts @@ -1,6 +1,6 @@ import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { Component, OnDestroy, OnInit } from '@angular/core'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable, timer } from 'rxjs'; import { mergeMap, map } from 'rxjs/operators'; @@ -19,17 +19,17 @@ export class HomeComponent implements OnInit, OnDestroy { const combined$ = combineLatest([timer$, this.cosmosSDK.sdk$]).pipe(map(([_, sdk]) => sdk)); this.nodeInfo$ = combined$.pipe( - mergeMap((sdk) => rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), ); this.syncing$ = combined$.pipe( mergeMap((sdk) => - rest.tendermint.getSyncing(sdk.rest).then((res) => res.data.syncing || false), + cosmosclient.rest.tendermint.getSyncing(sdk.rest).then((res) => res.data.syncing || false), ), ); } - ngOnInit() {} + ngOnInit() { } - ngOnDestroy() {} + ngOnDestroy() { } } diff --git a/projects/explorer/src/app/pages/home/mint/mint.component.ts b/projects/explorer/src/app/pages/home/mint/mint.component.ts index 6737359c3..cd8a21b69 100644 --- a/projects/explorer/src/app/pages/home/mint/mint.component.ts +++ b/projects/explorer/src/app/pages/home/mint/mint.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosMintV1beta1QueryAnnualProvisionsResponse, CosmosMintV1beta1QueryInflationResponse, @@ -23,12 +23,12 @@ export class MintComponent implements OnInit { private readonly cosmosSDK: CosmosSDKService, ) { this.inflation$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.mint.inflation(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.mint.inflation(sdk.rest).then((res) => res.data)), ); this.annualProvisions$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.mint.annualProvisions(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.mint.annualProvisions(sdk.rest).then((res) => res.data)), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/explorer/src/app/pages/home/txs/txs.component.ts b/projects/explorer/src/app/pages/home/txs/txs.component.ts index f5acd4e8d..1a2b9f6a5 100644 --- a/projects/explorer/src/app/pages/home/txs/txs.component.ts +++ b/projects/explorer/src/app/pages/home/txs/txs.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/explorer/src/app/models/config.service'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; @@ -40,7 +40,7 @@ export class TxsComponent implements OnInit { this.selectedTxType$, ]).pipe( switchMap(([sdk, _pageNumber, _pageSize, selectedTxType]) => { - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.module='${selectedTxType}'`], @@ -89,7 +89,7 @@ export class TxsComponent implements OnInit { return []; } - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.module='${selectedTxType}'`], @@ -110,7 +110,7 @@ export class TxsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } appSelectedTxTypeChanged(selectedTxType: string): void { this.selectedTxType$.next(selectedTxType); diff --git a/projects/explorer/src/app/pages/proposals/proposal/proposal.component.ts b/projects/explorer/src/app/pages/proposals/proposal/proposal.component.ts index aabf9dfbd..de365f123 100644 --- a/projects/explorer/src/app/pages/proposals/proposal/proposal.component.ts +++ b/projects/explorer/src/app/pages/proposals/proposal/proposal.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027Proposals, InlineResponse20029Deposits, @@ -34,7 +34,7 @@ export class ProposalComponent implements OnInit { const combined$ = combineLatest([this.cosmosSDK.sdk$, proposalID$]); this.proposal$ = combined$.pipe( - mergeMap(([sdk, address]) => rest.gov.proposal(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.gov.proposal(sdk.rest, address)), map((result) => result.data.proposal!), catchError((error) => { console.error(error); @@ -51,7 +51,7 @@ export class ProposalComponent implements OnInit { ); this.deposits$ = combined$.pipe( - mergeMap(([sdk, address]) => rest.gov.deposits(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.gov.deposits(sdk.rest, address)), map((result) => result.data.deposits!), catchError((error) => { console.error(error); @@ -60,12 +60,12 @@ export class ProposalComponent implements OnInit { ); this.depositParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.gov.params(sdk.rest, 'deposit')), + mergeMap((sdk) => cosmosclient.rest.gov.params(sdk.rest, 'deposit')), map((result) => result.data.deposit_params), ); this.tally$ = combined$.pipe( - mergeMap(([sdk, address]) => rest.gov.tallyresult(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.gov.tallyresult(sdk.rest, address)), map((result) => result.data.tally!), catchError((error) => { console.error(error); @@ -74,7 +74,7 @@ export class ProposalComponent implements OnInit { ); this.tallyParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.gov.params(sdk.rest, 'tallying')), + mergeMap((sdk) => cosmosclient.rest.gov.params(sdk.rest, 'tallying')), map((result) => result.data.tally_params), catchError((error) => { console.error(error); @@ -83,7 +83,7 @@ export class ProposalComponent implements OnInit { ); this.votes$ = combined$.pipe( - mergeMap(([sdk, address]) => rest.gov.votes(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.gov.votes(sdk.rest, address)), map((result) => result.data.votes!), catchError((error) => { console.error(error); @@ -92,7 +92,7 @@ export class ProposalComponent implements OnInit { ); this.votingParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.gov.params(sdk.rest, 'voting')), + mergeMap((sdk) => cosmosclient.rest.gov.params(sdk.rest, 'voting')), map((result) => result.data.voting_params), catchError((error) => { console.error(error); @@ -101,5 +101,5 @@ export class ProposalComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/explorer/src/app/pages/proposals/proposals.component.ts b/projects/explorer/src/app/pages/proposals/proposals.component.ts index acdddeb5f..63688a7fc 100644 --- a/projects/explorer/src/app/pages/proposals/proposals.component.ts +++ b/projects/explorer/src/app/pages/proposals/proposals.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027FinalTallyResult, InlineResponse20027Proposals, @@ -23,14 +23,14 @@ export class ProposalsComponent implements OnInit { private readonly cosmosSDK: CosmosSDKService, ) { this.proposals$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.gov.proposals(sdk.rest)), + mergeMap((sdk) => cosmosclient.rest.gov.proposals(sdk.rest)), map((result) => result.data.proposals!), ); this.tallies$ = combineLatest([this.cosmosSDK.sdk$, this.proposals$]).pipe( mergeMap(([sdk, proposals]) => Promise.all( proposals.map((proposal) => - rest.gov.tallyresult(sdk.rest, proposal.proposal_id!).catch((err) => { + cosmosclient.rest.gov.tallyresult(sdk.rest, proposal.proposal_id!).catch((err) => { console.log(err); return; }), @@ -41,5 +41,5 @@ export class ProposalsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/explorer/src/app/pages/txs/tx/tx.component.ts b/projects/explorer/src/app/pages/txs/tx/tx.component.ts index dca341483..817ae36ba 100644 --- a/projects/explorer/src/app/pages/txs/tx/tx.component.ts +++ b/projects/explorer/src/app/pages/txs/tx/tx.component.ts @@ -1,7 +1,7 @@ import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosTxV1beta1GetTxResponse } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -18,7 +18,7 @@ export class TxComponent implements OnInit { constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { this.txHash$ = this.route.params.pipe(map((params) => params.tx_hash)); this.tx$ = combineLatest([this.cosmosSDK.sdk$, this.txHash$]).pipe( - mergeMap(([sdk, hash]) => rest.tx.getTx(sdk.rest, hash).then((res) => res.data)), + mergeMap(([sdk, hash]) => cosmosclient.rest.tx.getTx(sdk.rest, hash).then((res) => res.data)), ); this.tx$.subscribe((x) => console.log(x)); this.txType$ = this.tx$.pipe( @@ -39,5 +39,5 @@ export class TxComponent implements OnInit { this.txType$.subscribe((x) => console.log('A', x)); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/explorer/src/app/pages/txs/txs.component.ts b/projects/explorer/src/app/pages/txs/txs.component.ts index 559306146..1bb0b0d2b 100644 --- a/projects/explorer/src/app/pages/txs/txs.component.ts +++ b/projects/explorer/src/app/pages/txs/txs.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/explorer/src/app/models/config.service'; import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; @@ -60,7 +60,7 @@ export class TxsComponent implements OnInit { this.txsTotalCount$ = combineLatest([sdk$, this.selectedTxTypeChanged$]).pipe( switchMap(([sdk, selectedTxType]) => { - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.module='${selectedTxType}'`], @@ -119,8 +119,8 @@ export class TxsComponent implements OnInit { // Note: This is strange. This is temporary workaround way. const temporaryWorkaroundPageSize = txsTotalCount === BigInt(1) && - modifiedPageOffset === BigInt(1) && - modifiedPageSize === BigInt(1) + modifiedPageOffset === BigInt(1) && + modifiedPageSize === BigInt(1) ? modifiedPageSize + BigInt(1) : modifiedPageSize; @@ -128,7 +128,7 @@ export class TxsComponent implements OnInit { return []; } - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.module='${selectedTxType}'`], @@ -147,7 +147,7 @@ export class TxsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } appSelectedTxTypeChanged(selectedTxType: string): void { this.router.navigate([], { diff --git a/projects/explorer/src/app/pages/validators/validator/validator.component.ts b/projects/explorer/src/app/pages/validators/validator/validator.component.ts index a48aebd8b..3c9ca131d 100644 --- a/projects/explorer/src/app/pages/validators/validator/validator.component.ts +++ b/projects/explorer/src/app/pages/validators/validator/validator.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; import { validatorType } from '../../../views/validators/validators.component'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod } from '@cosmos-client/core/esm/openapi'; import { Observable, combineLatest } from 'rxjs'; import { map, withLatestFrom, mergeMap } from 'rxjs/operators'; @@ -30,7 +30,7 @@ export class ValidatorComponent implements OnInit { ); this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.staking.validators(sdk.rest)), + mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), map((result) => result.data), ); @@ -77,5 +77,5 @@ export class ValidatorComponent implements OnInit { ); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/explorer/src/app/pages/validators/validators.component.ts b/projects/explorer/src/app/pages/validators/validators.component.ts index 35a5033bd..19d78ce5a 100644 --- a/projects/explorer/src/app/pages/validators/validators.component.ts +++ b/projects/explorer/src/app/pages/validators/validators.component.ts @@ -1,7 +1,7 @@ import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { validatorType, validatorWithShareType } from '../../views/validators/validators.component'; import { Component, OnInit } from '@angular/core'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod } from '@cosmos-client/core/esm/openapi'; import { Observable, BehaviorSubject, combineLatest } from 'rxjs'; import { map, mergeMap, withLatestFrom } from 'rxjs/operators'; @@ -21,7 +21,7 @@ export class ValidatorsComponent implements OnInit { constructor(private cosmosSDK: CosmosSDKService) { this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.staking.validators(sdk.rest)), + mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), map((result) => result.data), ); @@ -78,7 +78,7 @@ export class ValidatorsComponent implements OnInit { ); } - ngOnInit() {} + ngOnInit() { } onToggleChange(value: boolean) { this.activeEnabled.next(value); diff --git a/projects/explorer/src/app/views/accounts/account/account.component.ts b/projects/explorer/src/app/views/accounts/account/account.component.ts index 3ccb1b611..7d986fcb3 100644 --- a/projects/explorer/src/app/views/accounts/account/account.component.ts +++ b/projects/explorer/src/app/views/accounts/account/account.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, Input, OnChanges } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'view-account', @@ -8,47 +8,47 @@ import { cosmosclient, proto } from '@cosmos-client/core'; }) export class AccountComponent implements OnInit, OnChanges { @Input() - account?: proto.cosmos.auth.v1beta1.BaseAccount | unknown | null; + account?: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount | unknown | null; @Input() - balances?: proto.cosmos.base.v1beta1.ICoin[] | null; + balances?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; //Todo : add price information @Input() value?: number; - baseAccount?: proto.cosmos.auth.v1beta1.BaseAccount; - vestingAccount?: proto.cosmos.vesting.v1beta1.ContinuousVestingAccount; + baseAccount?: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount; + vestingAccount?: cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount; publicKey?: string; txColumnKeys = ['height', 'txhash', 'timestamp', 'gas_wanted', 'gas_used']; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } ngOnChanges() { delete this.baseAccount; - if (this.account instanceof proto.cosmos.auth.v1beta1.BaseAccount) { + if (this.account instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { this.baseAccount = this.account; // Todo: fix pub_key zero issue and convert bech32 format const publicKey = cosmosclient.codec.protoAnyToInstance(this.baseAccount.pub_key); - if (!(publicKey instanceof proto.cosmos.crypto.secp256k1.PubKey)) { + if (!(publicKey instanceof cosmosclient.proto.cosmos.crypto.secp256k1.PubKey)) { throw Error('Invalid public key!'); } this.publicKey = Buffer.from(publicKey.key).toString('hex'); - } else if (this.account instanceof proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + } else if (this.account instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { this.vestingAccount = this.account; if (this.vestingAccount.base_vesting_account?.base_account === null) { throw Error('Invalid vesting account!'); } - this.baseAccount = new proto.cosmos.auth.v1beta1.BaseAccount( + this.baseAccount = new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( this.vestingAccount.base_vesting_account?.base_account, ); // Todo: fix pub_key zero issue and convert bech32 format const publicKey = cosmosclient.codec.protoAnyToInstance(this.baseAccount.pub_key); - if (!(publicKey instanceof proto.cosmos.crypto.secp256k1.PubKey)) { + if (!(publicKey instanceof cosmosclient.proto.cosmos.crypto.secp256k1.PubKey)) { throw Error('Invalid public key!'); } this.publicKey = Buffer.from(publicKey.key).toString('hex'); diff --git a/projects/explorer/src/app/views/cosmos/staking/validators/validator/validator.component.ts b/projects/explorer/src/app/views/cosmos/staking/validators/validator/validator.component.ts index 6486938b8..dfdfb83ff 100644 --- a/projects/explorer/src/app/views/cosmos/staking/validators/validator/validator.component.ts +++ b/projects/explorer/src/app/views/cosmos/staking/validators/validator/validator.component.ts @@ -1,6 +1,6 @@ import { validatorType } from './../../../../../views/cosmos/staking/validators/validators.component'; import { Component, OnInit, Input } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20014Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @@ -16,9 +16,9 @@ export class ValidatorComponent implements OnInit { @Input() accAddress?: cosmosclient.AccAddress | null; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(validator: InlineResponse20014Validators | undefined | null) { const hash = crypto diff --git a/projects/explorer/src/app/views/cosmos/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts b/projects/explorer/src/app/views/cosmos/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts index 24a10d091..679b267c4 100644 --- a/projects/explorer/src/app/views/cosmos/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts +++ b/projects/explorer/src/app/views/cosmos/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'app-view-tx-fee-confirm-dialog', @@ -11,13 +11,13 @@ export class TxFeeConfirmDialogComponent implements OnInit { constructor( @Inject(MAT_DIALOG_DATA) public readonly data: { - fee: proto.cosmos.base.v1beta1.ICoin; + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; isConfirmed: boolean; }, private readonly dialogRef: MatDialogRef, - ) {} + ) { } - ngOnInit(): void {} + ngOnInit(): void { } okToSendTx(): void { this.data.isConfirmed = true; diff --git a/projects/explorer/src/app/views/proposals/proposal/proposal.component.ts b/projects/explorer/src/app/views/proposals/proposal/proposal.component.ts index caa268787..874a5cb98 100644 --- a/projects/explorer/src/app/views/proposals/proposal/proposal.component.ts +++ b/projects/explorer/src/app/views/proposals/proposal/proposal.component.ts @@ -1,6 +1,6 @@ import { ProposalContent } from '../proposals.component'; import { Component, Input, OnInit } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027Proposals, InlineResponse20029Deposits, @@ -34,9 +34,9 @@ export class ProposalComponent implements OnInit { @Input() votingParams?: InlineResponse20026VotingParams | null; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } unpackContent(value: any) { try { diff --git a/projects/explorer/src/app/views/proposals/proposals.component.ts b/projects/explorer/src/app/views/proposals/proposals.component.ts index 7811b6ae7..6ef20d615 100644 --- a/projects/explorer/src/app/views/proposals/proposals.component.ts +++ b/projects/explorer/src/app/views/proposals/proposals.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027FinalTallyResult, InlineResponse20027Proposals, @@ -23,9 +23,9 @@ export class ProposalsComponent implements OnInit { @Input() tallies?: (InlineResponse20027FinalTallyResult | undefined)[] | null; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } unpackContent(value: any) { try { diff --git a/projects/explorer/src/app/views/txs/tx/tx.component.ts b/projects/explorer/src/app/views/txs/tx/tx.component.ts index b5358a912..9fe2495b6 100644 --- a/projects/explorer/src/app/views/txs/tx/tx.component.ts +++ b/projects/explorer/src/app/views/txs/tx/tx.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, Input } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosTxV1beta1GetTxResponse } from '@cosmos-client/core/esm/openapi'; @Component({ @@ -14,9 +14,9 @@ export class TxComponent implements OnInit { @Input() txType?: string[] | null; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } unpackKey(value: any) { try { diff --git a/projects/explorer/src/app/views/validators/validator/validator.component.ts b/projects/explorer/src/app/views/validators/validator/validator.component.ts index 2e6f8ca35..e3934f8c8 100644 --- a/projects/explorer/src/app/views/validators/validator/validator.component.ts +++ b/projects/explorer/src/app/views/validators/validator/validator.component.ts @@ -1,6 +1,6 @@ import { validatorType } from '../validators.component'; import { Component, OnInit, Input } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @@ -16,9 +16,9 @@ export class ValidatorComponent implements OnInit { @Input() accAddress?: cosmosclient.AccAddress | null; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(validator: InlineResponse20041Validators | undefined | null) { const hash = crypto From 60d104671692ea5337997ad7708e443d9e8b8597 Mon Sep 17 00:00:00 2001 From: taro04 Date: Tue, 28 Jun 2022 21:40:57 +0900 Subject: [PATCH 24/77] feat: update 0.46.0-rc5 portal and so on --- projects/marketplace/src/app/app.component.ts | 8 +- .../app/pages/balance/balance.component.ts | 40 ++--- .../app/views/balance/balance.component.ts | 20 +-- projects/portal/src/app/app.component.ts | 8 +- .../auctions/auction.application.service.ts | 12 +- .../auction.infrastructure.service.ts | 26 +-- .../app/models/auctions/auction.service.ts | 22 +-- .../models/cdps/cdp.application.service.ts | 56 +++---- .../models/cdps/cdp.infrastructure.service.ts | 150 +++++++++--------- .../portal/src/app/models/cdps/cdp.service.ts | 110 ++++++------- .../src/app/models/cosmos-sdk.service.ts | 2 +- .../models/cosmos/bank.application.service.ts | 14 +- .../src/app/models/cosmos/bank.service.ts | 36 ++--- .../distribution.application.service.ts | 16 +- .../app/models/cosmos/distribution.service.ts | 40 ++--- .../src/app/models/cosmos/gentx.service.ts | 14 +- .../models/cosmos/gov.application.service.ts | 26 +-- .../src/app/models/cosmos/gov.service.ts | 80 +++++----- .../cosmos/slashing.application.service.ts | 12 +- .../src/app/models/cosmos/slashing.service.ts | 22 +-- .../cosmos/staking.application.service.ts | 42 ++--- .../src/app/models/cosmos/staking.service.ts | 112 ++++++------- .../src/app/models/cosmos/tx-common.model.ts | 8 +- .../app/models/cosmos/tx-common.service.ts | 54 +++---- projects/portal/src/app/models/db.service.ts | 4 +- .../models/keys/key.infrastructure.service.ts | 6 +- .../portal/src/app/models/keys/key.service.ts | 2 +- .../keplr/keplr.infrastructure.service.ts | 8 +- .../app/models/wallets/keplr/keplr.service.ts | 6 +- .../metamask.infrastructure.service.ts | 6 +- .../wallets/metamask/metamask.service.ts | 6 +- .../wallets/wallet.infrastructure.service.ts | 4 +- .../src/app/models/wallets/wallet.model.ts | 2 +- .../accounts/account/account.component.ts | 14 +- .../distribution/distribution.component.ts | 10 +- .../account/staking/staking.component.ts | 8 +- .../accounts/account/txs/txs.component.ts | 6 +- .../create/simple/simple.component.ts | 2 +- .../app/pages/auction/auction.component.ts | 6 +- .../auctions/auction/auction.component.ts | 4 +- .../auction/place-bid/place-bid.component.ts | 6 +- .../auction/auctions/auctions.component.ts | 4 +- .../app/pages/balance/balance.component.ts | 40 ++--- .../pages/cosmos/bank/send/send.component.ts | 12 +- .../delegator/delegator.component.ts | 8 +- .../validator/validator.component.ts | 6 +- .../validators/validators.component.ts | 6 +- .../validator/validator.component.ts | 6 +- .../validators/validators.component.ts | 10 +- .../delegate-form-dialog.component.ts | 12 +- .../delegate-menu-dialog.component.ts | 12 +- .../redelegate-form-dialog.component.ts | 16 +- .../undelegate-form-dialog.component.ts | 16 +- ...-delegator-reward-form-dialog.component.ts | 6 +- ...idator-commission-form-dialog.component.ts | 6 +- .../deposit-form-dialog.component.ts | 12 +- .../vote-form-dialog.component.ts | 20 +-- .../pages/home/accounts/accounts.component.ts | 16 +- .../src/app/pages/home/bank/bank.component.ts | 6 +- .../app/pages/home/blocks/blocks.component.ts | 8 +- .../distribution/distribution.component.ts | 6 +- .../src/app/pages/home/home.component.ts | 10 +- .../src/app/pages/home/mint/mint.component.ts | 8 +- .../src/app/pages/home/txs/txs.component.ts | 8 +- .../src/app/pages/keys/key/key.component.ts | 20 +-- .../app/pages/mint/cdps/cdp/cdp.component.ts | 4 +- .../mint/cdps/cdp/clear/clear.component.ts | 10 +- .../cdps/cdp/deposit/deposit.component.ts | 12 +- .../mint/cdps/cdp/issue/issue.component.ts | 10 +- .../cdps/cdp/withdraw/withdraw.component.ts | 10 +- .../src/app/pages/mint/cdps/cdps.component.ts | 4 +- .../mint/cdps/create/create.component.ts | 10 +- .../unjail-simple/unjail-simple.component.ts | 8 +- .../pages/slashing/unjail/unjail.component.ts | 8 +- .../create-validator-multiple.component.ts | 6 +- .../create-validator-simple.component.ts | 8 +- .../create-validator.component.ts | 8 +- .../src/app/pages/txs/tx/tx.component.ts | 6 +- .../portal/src/app/pages/txs/txs.component.ts | 12 +- .../proposals/proposal/proposal.component.ts | 18 +-- .../vote/proposals/proposals.component.ts | 8 +- projects/portal/src/app/utils/converter.ts | 86 +++++----- projects/portal/src/app/utils/key.ts | 10 +- projects/portal/src/app/utils/stream.ts | 2 +- projects/portal/src/app/utils/validation.ts | 2 +- .../accounts/account/account.component.ts | 24 +-- .../auction/place-bid/place-bid.component.ts | 12 +- .../app/views/balance/balance.component.ts | 18 +-- .../views/cosmos/bank/send/send.component.ts | 18 +-- .../delegators/create/create.component.ts | 8 +- .../validator/validator.component.ts | 8 +- .../tx-fee-confirm-dialog.component.ts | 8 +- .../validator/validator.component.ts | 6 +- .../delegate-form-dialog.component.ts | 16 +- .../delegate-menu-dialog.component.ts | 6 +- ...tive-validator-confirm-dialog.component.ts | 5 +- .../redelegate-form-dialog.component.ts | 18 +-- .../undelegate-form-dialog.component.ts | 18 +-- ...-delegator-reward-form-dialog.component.ts | 10 +- ...idator-commission-form-dialog.component.ts | 10 +- .../deposit/deposit-form-dialog.component.ts | 16 +- .../vote/vote/vote-form-dialog.component.ts | 14 +- ...ifi-create-wallet-form-dialog.component.ts | 2 +- ...let-with-mnemonic-form-dialog.component.ts | 2 +- ...-with-private-key-form-dialog.component.ts | 2 +- .../views/home/accounts/accounts.component.ts | 12 +- .../src/app/views/keys/key/key.component.ts | 18 +-- .../mint/cdps/cdp/clear/clear.component.ts | 18 +-- .../cdps/cdp/deposit/deposit.component.ts | 18 +-- .../mint/cdps/cdp/issue/issue.component.ts | 16 +- .../cdps/cdp/withdraw/withdraw.component.ts | 16 +- .../mint/cdps/create/create.component.ts | 18 +-- .../unjail-simple/unjail-simple.component.ts | 14 +- .../views/slashing/unjail/unjail.component.ts | 12 +- .../create-validator-multiple.component.ts | 12 +- .../create-validator-simple.component.ts | 14 +- .../create-validator.component.ts | 12 +- .../src/app/views/txs/tx/tx.component.ts | 6 +- .../proposals/proposal/proposal.component.ts | 4 +- .../vote/proposals/proposals.component.ts | 4 +- .../models/cosmos-sdk/cosmos-sdk.service.ts | 2 +- .../cosmos/tx/common/tx-common.model.ts | 10 +- .../cosmos/tx/common/tx-common.service.ts | 54 +++---- .../shared/src/lib/models/db/db.service.ts | 4 +- .../tx/nft/nft-tx.application.service.ts | 10 +- .../tx/nft/nft-tx.infrastructure.service.ts | 22 +-- .../models/ununifi/tx/nft/nft-tx.service.ts | 14 +- .../keplr/keplr.infrastructure.service.ts | 8 +- .../lib/models/wallets/keplr/keplr.service.ts | 6 +- .../metamask.infrastructure.service.ts | 6 +- .../wallets/metamask/metamask.service.ts | 6 +- .../ununifi-wallet.infrastructure.service.ts | 8 +- .../ununifi-wallet/ununifi-wallet.service.ts | 10 +- .../wallets/wallet.infrastructure.service.ts | 4 +- .../src/lib/models/wallets/wallet.model.ts | 2 +- projects/shared/src/lib/utils/converter.ts | 86 +++++----- projects/shared/src/lib/utils/key.ts | 10 +- projects/shared/src/lib/utils/validation.ts | 2 +- .../tx-fee-confirm-dialog.component.ts | 8 +- .../list-nft-form-dialog.component.ts | 12 +- ...ifi-create-wallet-form-dialog.component.ts | 4 +- ...let-with-mnemonic-form-dialog.component.ts | 4 +- ...-with-private-key-form-dialog.component.ts | 4 +- .../list-nft-form-dialog.component.ts | 10 +- 144 files changed, 1133 insertions(+), 1134 deletions(-) diff --git a/projects/marketplace/src/app/app.component.ts b/projects/marketplace/src/app/app.component.ts index a60e513c7..6f7b4d6f1 100644 --- a/projects/marketplace/src/app/app.component.ts +++ b/projects/marketplace/src/app/app.component.ts @@ -1,7 +1,7 @@ import { SearchResult } from './views/toolbar/toolbar.component'; import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; -import { cosmosclient, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { Config, ConfigService } from 'projects/shared/src/lib/models/config/config.service'; import { CosmosSDKService } from 'projects/shared/src/lib/models/cosmos-sdk/cosmos-sdk.service'; import { WalletApplicationService } from 'projects/shared/src/lib/models/wallets/wallet.application.service'; @@ -82,7 +82,7 @@ export class AppComponent implements OnInit { return of(false); } try { - return rest.tendermint.getLatestBlock(sdk.rest).then((res) => { + return cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => { return res.data && res.data.block?.header?.height && BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) @@ -126,7 +126,7 @@ export class AppComponent implements OnInit { return of(false); } try { - const tx = rest.tx + const tx = cosmosclient.rest.tx .getTx(sdk.rest, searchBoxInputValue) .then((res) => { console.log(res); @@ -217,5 +217,5 @@ export class AppComponent implements OnInit { this.configS.setCurrentConfig(value); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/marketplace/src/app/pages/balance/balance.component.ts b/projects/marketplace/src/app/pages/balance/balance.component.ts index 386091110..3b958d8e3 100644 --- a/projects/marketplace/src/app/pages/balance/balance.component.ts +++ b/projects/marketplace/src/app/pages/balance/balance.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { PubKey } from '@cosmos-client/core/esm/types'; import { Config, ConfigService } from 'projects/shared/src/lib/models/config/config.service'; @@ -37,27 +37,27 @@ export class BalanceComponent implements OnInit { valAddress$: Observable; cosmosUnknownAccount$: Observable; cosmosAccount$: Observable< - | proto.cosmos.auth.v1beta1.BaseAccount - | proto.cosmos.vesting.v1beta1.BaseVestingAccount - | proto.cosmos.vesting.v1beta1.ContinuousVestingAccount - | proto.cosmos.vesting.v1beta1.DelayedVestingAccount - | proto.cosmos.vesting.v1beta1.PeriodicVestingAccount - | proto.cosmos.vesting.v1beta1.PermanentLockedAccount - | proto.cosmos.auth.v1beta1.ModuleAccount + | cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount + | cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount | null | undefined >; - cosmosBaseAccount$: Observable; + cosmosBaseAccount$: Observable; accountTypeName$: Observable; - balances$: Observable; + balances$: Observable; faucets$: Observable< | { - hasFaucet: boolean; - faucetURL: string; - denom: string; - creditAmount: number; - maxCredit: number; - }[] + hasFaucet: boolean; + faucetURL: string; + denom: string; + creditAmount: number; + maxCredit: number; + }[] | undefined >; nodeInfo$: Observable; @@ -106,7 +106,7 @@ export class BalanceComponent implements OnInit { if (!cosmosAccAddress) { return of(cosmosAccAddress); } - return rest.auth + return cosmosclient.rest.auth .account(sdk.rest, cosmosAccAddress) .then( (res) => @@ -135,7 +135,7 @@ export class BalanceComponent implements OnInit { if (!cosmosAccAddress) { return of(cosmosAccAddress); } - return rest.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, cosmosAccAddress) .then((res) => res.data.balances) .catch((error) => { @@ -177,9 +177,9 @@ export class BalanceComponent implements OnInit { }), ); this.nodeInfo$ = sdk$.pipe( - mergeMap((sdk) => rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/marketplace/src/app/views/balance/balance.component.ts b/projects/marketplace/src/app/views/balance/balance.component.ts index b34a150fd..9f88020a2 100644 --- a/projects/marketplace/src/app/views/balance/balance.component.ts +++ b/projects/marketplace/src/app/views/balance/balance.component.ts @@ -1,7 +1,7 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { Component, Input, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { WalletType } from 'projects/shared/src/lib/models/wallets/wallet.model'; @@ -17,21 +17,21 @@ export class ViewBalanceComponent implements OnInit { @Input() accountTypeName?: string | null; @Input() publicKey?: string | null; @Input() valAddress?: string | null; - @Input() balances?: proto.cosmos.base.v1beta1.ICoin[] | null; + @Input() balances?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() faucets?: | { - hasFaucet: boolean; - faucetURL: string; - denom: string; - creditAmount: number; - maxCredit: number; - }[] + hasFaucet: boolean; + faucetURL: string; + denom: string; + creditAmount: number; + maxCredit: number; + }[] | null; @Input() nodeInfo?: InlineResponse20012 | null; - constructor(private readonly snackBar: MatSnackBar, private clipboard: Clipboard) {} + constructor(private readonly snackBar: MatSnackBar, private clipboard: Clipboard) { } - ngOnInit(): void {} + ngOnInit(): void { } copyClipboard(value: string) { if (value.length > 0) { diff --git a/projects/portal/src/app/app.component.ts b/projects/portal/src/app/app.component.ts index ee417fc71..f14e72111 100644 --- a/projects/portal/src/app/app.component.ts +++ b/projects/portal/src/app/app.component.ts @@ -4,7 +4,7 @@ import { WalletApplicationService } from './models/wallets/wallet.application.se import { SearchResult } from './views/toolbar/toolbar.component'; import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; -import { cosmosclient, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable, BehaviorSubject, of, pipe } from 'rxjs'; import { mergeMap, map } from 'rxjs/operators'; @@ -100,7 +100,7 @@ export class AppComponent implements OnInit { return of(false); } try { - return rest.tendermint.getLatestBlock(sdk.rest).then((res) => { + return cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => { return res.data && res.data.block?.header?.height && BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) @@ -144,7 +144,7 @@ export class AppComponent implements OnInit { return of(false); } try { - const tx = rest.tx + const tx = cosmosclient.rest.tx .getTx(sdk.rest, searchBoxInputValue) .then((res) => { console.log(res); @@ -235,5 +235,5 @@ export class AppComponent implements OnInit { this.configS.setCurrentConfig(value); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/portal/src/app/models/auctions/auction.application.service.ts b/projects/portal/src/app/models/auctions/auction.application.service.ts index 423392fa9..7019cc8f7 100644 --- a/projects/portal/src/app/models/auctions/auction.application.service.ts +++ b/projects/portal/src/app/models/auctions/auction.application.service.ts @@ -6,7 +6,7 @@ import { AuctionService } from './auction.service'; import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -21,12 +21,12 @@ export class AuctionApplicationService { private readonly loadingDialog: LoadingDialogService, private readonly auction: AuctionService, private readonly walletService: WalletService, - ) {} + ) { } async placeBid( auctionID: number, - amount: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { // get public key @@ -43,8 +43,8 @@ export class AuctionApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); diff --git a/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts b/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts index efef888b1..b56ccf261 100644 --- a/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts +++ b/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts @@ -3,7 +3,7 @@ import { TxCommonService } from '../cosmos/tx-common.service'; import { CosmosWallet } from '../wallets/wallet.model'; import { IAuctionInfrastructure } from './auction.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; import { ununifi } from 'ununifi-client'; @@ -12,14 +12,14 @@ import { ununifi } from 'ununifi-client'; providedIn: 'root', }) export class AuctionInfrastructureService implements IAuctionInfrastructure { - constructor(private readonly txCommonService: TxCommonService) {} + constructor(private readonly txCommonService: TxCommonService) { } async placeBid( auctionID: number, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -49,16 +49,16 @@ export class AuctionInfrastructureService implements IAuctionInfrastructure { async simulateToPlaceBid( auctionID: number, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -74,10 +74,10 @@ export class AuctionInfrastructureService implements IAuctionInfrastructure { async buildPlaceBidTxBuilder( auctionID: number, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const baseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); if (!baseAccount) { @@ -99,7 +99,7 @@ export class AuctionInfrastructureService implements IAuctionInfrastructure { buildMsgPlaceBid( auctionID: number, bidder: string, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): ununifi.auction.MsgPlaceBid { const msgPlaceBid = new ununifi.auction.MsgPlaceBid({ auction_id: Long.fromNumber(auctionID), diff --git a/projects/portal/src/app/models/auctions/auction.service.ts b/projects/portal/src/app/models/auctions/auction.service.ts index e1a67ebac..6da003da1 100644 --- a/projects/portal/src/app/models/auctions/auction.service.ts +++ b/projects/portal/src/app/models/auctions/auction.service.ts @@ -2,23 +2,23 @@ import { SimulatedTxResultResponse } from '../cosmos/tx-common.model'; import { CosmosWallet } from '../wallets/wallet.model'; import { AuctionInfrastructureService } from './auction.infrastructure.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; export interface IAuctionInfrastructure { placeBid( auctionID: number, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise; simulateToPlaceBid( auction_id: number, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise; } @@ -34,19 +34,19 @@ export class AuctionService { placeBid( auctionID: number, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { return this.iAuctionInfrastructure.placeBid(auctionID, amount, currentCosmosWallet, gas, fee); } simulateToPlaceBid( auctionID: number, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { return this.iAuctionInfrastructure.simulateToPlaceBid( diff --git a/projects/portal/src/app/models/cdps/cdp.application.service.ts b/projects/portal/src/app/models/cdps/cdp.application.service.ts index 8103363ba..32c70bde6 100644 --- a/projects/portal/src/app/models/cdps/cdp.application.service.ts +++ b/projects/portal/src/app/models/cdps/cdp.application.service.ts @@ -7,7 +7,7 @@ import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; @@ -22,16 +22,16 @@ export class CdpApplicationService { private readonly loadingDialog: LoadingDialogService, private readonly cdp: CdpService, private readonly key: KeyService, - ) {} + ) { } async createCDP( key: Key, privateKey: Uint8Array, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - principal: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, - balances: proto.cosmos.base.v1beta1.ICoin[], + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], gasRatio: number, ) { // validation @@ -42,8 +42,8 @@ export class CdpApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); // confirm whether account has enough gas denom for simulation @@ -145,9 +145,9 @@ export class CdpApplicationService { key: Key, privateKey: Uint8Array, collateralType: string, - principal: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, - balances: proto.cosmos.base.v1beta1.ICoin[], + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], gasRatio: number, ) { // validation @@ -158,8 +158,8 @@ export class CdpApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); // confirm whether account has enough gas denom for simulation @@ -259,9 +259,9 @@ export class CdpApplicationService { key: Key, privateKey: Uint8Array, collateralType: string, - repayment: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, - balances: proto.cosmos.base.v1beta1.ICoin[], + repayment: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], gasRatio: number, ) { // validation @@ -272,8 +272,8 @@ export class CdpApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); // confirm whether account has enough gas denom for simulation @@ -373,9 +373,9 @@ export class CdpApplicationService { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, - balances: proto.cosmos.base.v1beta1.ICoin[], + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], gasRatio: number, ) { // validation @@ -386,8 +386,8 @@ export class CdpApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); // confirm whether account has enough gas denom for simulation @@ -490,9 +490,9 @@ export class CdpApplicationService { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, - balances: proto.cosmos.base.v1beta1.ICoin[], + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], gasRatio: number, ) { // validation @@ -503,8 +503,8 @@ export class CdpApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); // confirm whether account has enough gas denom for simulation diff --git a/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts b/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts index 26715245a..62be0b15f 100644 --- a/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts +++ b/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts @@ -5,7 +5,7 @@ import { Key } from '../keys/key.model'; import { KeyService } from '../keys/key.service'; import { ICdpInfrastructure } from './cdp.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; @@ -19,16 +19,16 @@ export class CdpInfrastructureService implements ICdpInfrastructure { private readonly cosmosSDK: CosmosSDKService, private readonly keyService: KeyService, private readonly txCommonService: TxCommonService, - ) {} + ) { } async createCDP( key: Key, privateKey: Uint8Array, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - principal: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const txBuilder = await this.buildCreateCDPTx( key, @@ -46,16 +46,16 @@ export class CdpInfrastructureService implements ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - principal: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -75,10 +75,10 @@ export class CdpInfrastructureService implements ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - principal: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const sdk = await this.cosmosSDK.sdk(); const privKey = this.keyService.getPrivKey(key.type, privateKey); @@ -86,7 +86,7 @@ export class CdpInfrastructureService implements ICdpInfrastructure { const sender = cosmosclient.AccAddress.fromPublicKey(privKey.pubKey()); // get account info - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk.rest, sender) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -109,16 +109,16 @@ export class CdpInfrastructureService implements ICdpInfrastructure { collateral_type: collateralType, }); - const txBody = new proto.cosmos.tx.v1beta1.TxBody({ + const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgCreateCdp)], }); - const authInfo = new proto.cosmos.tx.v1beta1.AuthInfo({ + const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ signer_infos: [ { public_key: cosmosclient.codec.instanceToProtoAny(pubKey), mode_info: { single: { - mode: proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, + mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, }, }, sequence: baseAccount.sequence, @@ -142,9 +142,9 @@ export class CdpInfrastructureService implements ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - principal: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const txBuilder = await this.buildDrawCDPTx( key, @@ -161,15 +161,15 @@ export class CdpInfrastructureService implements ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - principal: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -188,9 +188,9 @@ export class CdpInfrastructureService implements ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - principal: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const sdk = await this.cosmosSDK.sdk(); const privKey = this.keyService.getPrivKey(key.type, privateKey); @@ -198,7 +198,7 @@ export class CdpInfrastructureService implements ICdpInfrastructure { const sender = cosmosclient.AccAddress.fromPublicKey(privKey.pubKey()); // get account info - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk.rest, sender) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -219,16 +219,16 @@ export class CdpInfrastructureService implements ICdpInfrastructure { principal, }); - const txBody = new proto.cosmos.tx.v1beta1.TxBody({ + const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgDrawDebt)], }); - const authInfo = new proto.cosmos.tx.v1beta1.AuthInfo({ + const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ signer_infos: [ { public_key: cosmosclient.codec.instanceToProtoAny(pubKey), mode_info: { single: { - mode: proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, + mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, }, }, sequence: baseAccount.sequence, @@ -252,9 +252,9 @@ export class CdpInfrastructureService implements ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - repayment: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + repayment: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const txBuilder = await this.buildRepayCDPTx( key, @@ -271,15 +271,15 @@ export class CdpInfrastructureService implements ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - repayment: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + repayment: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -298,9 +298,9 @@ export class CdpInfrastructureService implements ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - repayment: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + repayment: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const sdk = await this.cosmosSDK.sdk(); const privKey = this.keyService.getPrivKey(key.type, privateKey); @@ -308,7 +308,7 @@ export class CdpInfrastructureService implements ICdpInfrastructure { const sender = cosmosclient.AccAddress.fromPublicKey(privKey.pubKey()); // get account info - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk.rest, sender) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -329,16 +329,16 @@ export class CdpInfrastructureService implements ICdpInfrastructure { payment: repayment, }); - const txBody = new proto.cosmos.tx.v1beta1.TxBody({ + const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgRepayDebt)], }); - const authInfo = new proto.cosmos.tx.v1beta1.AuthInfo({ + const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ signer_infos: [ { public_key: cosmosclient.codec.instanceToProtoAny(pubKey), mode_info: { single: { - mode: proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, + mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, }, }, sequence: baseAccount.sequence, @@ -363,9 +363,9 @@ export class CdpInfrastructureService implements ICdpInfrastructure { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const txBUilder = await this.buildDepositCDPTx( key, @@ -384,15 +384,15 @@ export class CdpInfrastructureService implements ICdpInfrastructure { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -413,9 +413,9 @@ export class CdpInfrastructureService implements ICdpInfrastructure { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const sdk = await this.cosmosSDK.sdk(); const privKey = this.keyService.getPrivKey(key.type, privateKey); @@ -423,7 +423,7 @@ export class CdpInfrastructureService implements ICdpInfrastructure { const sender = cosmosclient.AccAddress.fromPublicKey(privKey.pubKey()); // get account info - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk.rest, sender) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -446,16 +446,16 @@ export class CdpInfrastructureService implements ICdpInfrastructure { collateral_type: collateralType, }); - const txBody = new proto.cosmos.tx.v1beta1.TxBody({ + const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgDepositCDP)], }); - const authInfo = new proto.cosmos.tx.v1beta1.AuthInfo({ + const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ signer_infos: [ { public_key: cosmosclient.codec.instanceToProtoAny(pubKey), mode_info: { single: { - mode: proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, + mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, }, }, sequence: baseAccount.sequence, @@ -480,9 +480,9 @@ export class CdpInfrastructureService implements ICdpInfrastructure { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const txBuilder = await this.buildWithdrawCDPTx( key, @@ -501,15 +501,15 @@ export class CdpInfrastructureService implements ICdpInfrastructure { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -530,9 +530,9 @@ export class CdpInfrastructureService implements ICdpInfrastructure { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const sdk = await this.cosmosSDK.sdk(); const privKey = this.keyService.getPrivKey(key.type, privateKey); @@ -540,7 +540,7 @@ export class CdpInfrastructureService implements ICdpInfrastructure { const sender = cosmosclient.AccAddress.fromPublicKey(privKey.pubKey()); // get account info - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk.rest, sender) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -563,16 +563,16 @@ export class CdpInfrastructureService implements ICdpInfrastructure { collateral_type: collateralType, }); - const txBody = new proto.cosmos.tx.v1beta1.TxBody({ + const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgWithdraw)], }); - const authInfo = new proto.cosmos.tx.v1beta1.AuthInfo({ + const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ signer_infos: [ { public_key: cosmosclient.codec.instanceToProtoAny(pubKey), mode_info: { single: { - mode: proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, + mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, }, }, sequence: baseAccount.sequence, diff --git a/projects/portal/src/app/models/cdps/cdp.service.ts b/projects/portal/src/app/models/cdps/cdp.service.ts index 75b95720c..8cb484769 100644 --- a/projects/portal/src/app/models/cdps/cdp.service.ts +++ b/projects/portal/src/app/models/cdps/cdp.service.ts @@ -2,7 +2,7 @@ import { SimulatedTxResultResponse } from '../cosmos/tx-common.model'; import { Key } from '../keys/key.model'; import { CdpInfrastructureService } from './cdp.infrastructure.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; export interface ICdpInfrastructure { @@ -10,19 +10,19 @@ export interface ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - principal: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise; simulateToCreateCDP( key: Key, privateKey: Uint8Array, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - principal: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise; @@ -30,17 +30,17 @@ export interface ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - principal: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise; simulateToDrawCDP( key: Key, privateKey: Uint8Array, collateralType: string, - principal: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise; @@ -48,17 +48,17 @@ export interface ICdpInfrastructure { key: Key, privateKey: Uint8Array, collateralType: string, - repayment: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + repayment: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise; simulateToRepayCDP( key: Key, privateKey: Uint8Array, collateralType: string, - repayment: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + repayment: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise; @@ -67,9 +67,9 @@ export interface ICdpInfrastructure { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise; simulateToDepositCDP( @@ -77,8 +77,8 @@ export interface ICdpInfrastructure { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise; @@ -87,9 +87,9 @@ export interface ICdpInfrastructure { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise; simulateToWithdrawCDP( @@ -97,8 +97,8 @@ export interface ICdpInfrastructure { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise; } @@ -116,10 +116,10 @@ export class CdpService { key: Key, privateKey: Uint8Array, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - principal: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { return this.iCdpInfrastructure.createCDP( key, @@ -136,9 +136,9 @@ export class CdpService { key: Key, privateKey: Uint8Array, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - principal: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { return this.iCdpInfrastructure.simulateToCreateCDP( @@ -156,9 +156,9 @@ export class CdpService { key: Key, privateKey: Uint8Array, collateralType: string, - principal: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { return this.iCdpInfrastructure.drawCDP(key, privateKey, collateralType, principal, gas, fee); } @@ -167,8 +167,8 @@ export class CdpService { key: Key, privateKey: Uint8Array, collateralType: string, - principal: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { return this.iCdpInfrastructure.simulateToDrawCDP( @@ -185,9 +185,9 @@ export class CdpService { key: Key, privateKey: Uint8Array, collateralType: string, - repayment: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + repayment: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { return this.iCdpInfrastructure.repayCDP(key, privateKey, collateralType, repayment, gas, fee); } @@ -196,8 +196,8 @@ export class CdpService { key: Key, privateKey: Uint8Array, collateralType: string, - repayment: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + repayment: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { return this.iCdpInfrastructure.simulateToRepayCDP( @@ -215,9 +215,9 @@ export class CdpService { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { return this.iCdpInfrastructure.depositCDP( key, @@ -235,8 +235,8 @@ export class CdpService { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { return this.iCdpInfrastructure.simulateToDepositCDP( @@ -255,9 +255,9 @@ export class CdpService { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { return this.iCdpInfrastructure.withdrawCDP( key, @@ -275,8 +275,8 @@ export class CdpService { privateKey: Uint8Array, ownerAddr: cosmosclient.AccAddress, collateralType: string, - collateral: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { return this.iCdpInfrastructure.simulateToWithdrawCDP( diff --git a/projects/portal/src/app/models/cosmos-sdk.service.ts b/projects/portal/src/app/models/cosmos-sdk.service.ts index 2acec7f81..7c650674a 100644 --- a/projects/portal/src/app/models/cosmos-sdk.service.ts +++ b/projects/portal/src/app/models/cosmos-sdk.service.ts @@ -1,6 +1,6 @@ import { Config, ConfigService } from './config.service'; import { Injectable } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable } from 'rxjs'; import { first, map } from 'rxjs/operators'; diff --git a/projects/portal/src/app/models/cosmos/bank.application.service.ts b/projects/portal/src/app/models/cosmos/bank.application.service.ts index 3a4ac81ad..312eb95da 100644 --- a/projects/portal/src/app/models/cosmos/bank.application.service.ts +++ b/projects/portal/src/app/models/cosmos/bank.application.service.ts @@ -7,7 +7,7 @@ import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -23,13 +23,13 @@ export class BankApplicationService { private readonly bank: BankService, private readonly walletService: WalletService, private readonly txCommon: TxCommonService, - ) {} + ) { } async send( toAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin[], - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, - balances: proto.cosmos.base.v1beta1.ICoin[], + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], gasRatio: number, ) { // TODO: firstValueFrom @@ -67,8 +67,8 @@ export class BankApplicationService { } let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; try { simulatedResultData = await this.bank.simulateToSend( diff --git a/projects/portal/src/app/models/cosmos/bank.service.ts b/projects/portal/src/app/models/cosmos/bank.service.ts index 94b876d5e..b2fc4211e 100644 --- a/projects/portal/src/app/models/cosmos/bank.service.ts +++ b/projects/portal/src/app/models/cosmos/bank.service.ts @@ -3,7 +3,7 @@ import { CosmosWallet } from '../wallets/wallet.model'; import { SimulatedTxResultResponse } from './tx-common.model'; import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; @Injectable({ @@ -13,21 +13,21 @@ export class BankService { constructor( private readonly cosmosSDK: CosmosSDKService, private readonly txCommonService: TxCommonService, - ) {} + ) { } async simulateToSend( - fromAccount: proto.cosmos.auth.v1beta1.BaseAccount, + fromAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, toAddress: cosmosclient.AccAddress, - amount: proto.cosmos.base.v1beta1.ICoin[], + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -43,12 +43,12 @@ export class BankService { } async send( - fromAccount: proto.cosmos.auth.v1beta1.BaseAccount, + fromAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, toAddress: cosmosclient.AccAddress, - amount: proto.cosmos.base.v1beta1.ICoin[], + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -76,12 +76,12 @@ export class BankService { } async buildSendTxBuilder( - fromAccount: proto.cosmos.auth.v1beta1.BaseAccount, + fromAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, toAddress: cosmosclient.AccAddress, - amount: proto.cosmos.base.v1beta1.ICoin[], + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const fromAddress = cosmosclient.AccAddress.fromString(fromAccount.address); @@ -102,9 +102,9 @@ export class BankService { buildMsgSend( fromAddress: cosmosclient.AccAddress, toAddress: cosmosclient.AccAddress, - amount: proto.cosmos.base.v1beta1.ICoin[], - ): proto.cosmos.bank.v1beta1.MsgSend { - const msgSend = new proto.cosmos.bank.v1beta1.MsgSend({ + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], + ): cosmosclient.proto.cosmos.bank.v1beta1.MsgSend { + const msgSend = new cosmosclient.proto.cosmos.bank.v1beta1.MsgSend({ from_address: fromAddress.toString(), to_address: toAddress.toString(), amount, diff --git a/projects/portal/src/app/models/cosmos/distribution.application.service.ts b/projects/portal/src/app/models/cosmos/distribution.application.service.ts index f2fcfe699..7822081e8 100644 --- a/projects/portal/src/app/models/cosmos/distribution.application.service.ts +++ b/projects/portal/src/app/models/cosmos/distribution.application.service.ts @@ -9,7 +9,7 @@ import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050, InlineResponse20041Validators, @@ -28,7 +28,7 @@ export class DistributionApplicationService { private readonly loadingDialog: LoadingDialogService, private readonly distribution: DistributionService, private readonly walletService: WalletService, - ) {} + ) { } async openWithdrawDelegatorRewardFormDialog( validator: InlineResponse20041Validators, @@ -52,7 +52,7 @@ export class DistributionApplicationService { async withdrawDelegatorReward( validatorAddress: string, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { // get public key @@ -69,8 +69,8 @@ export class DistributionApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); @@ -142,7 +142,7 @@ export class DistributionApplicationService { async withdrawValidatorCommission( validatorAddress: string, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { // get public key @@ -159,8 +159,8 @@ export class DistributionApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); diff --git a/projects/portal/src/app/models/cosmos/distribution.service.ts b/projects/portal/src/app/models/cosmos/distribution.service.ts index 1ff136b5b..eef63e027 100644 --- a/projects/portal/src/app/models/cosmos/distribution.service.ts +++ b/projects/portal/src/app/models/cosmos/distribution.service.ts @@ -4,7 +4,7 @@ import { CosmosWallet } from '../wallets/wallet.model'; import { SimulatedTxResultResponse } from './tx-common.model'; import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, rest, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; @Injectable({ @@ -15,14 +15,14 @@ export class DistributionService { private readonly cosmosSDK: CosmosSDKService, private readonly key: KeyService, private readonly txCommonService: TxCommonService, - ) {} + ) { } // Withdraw Delegator Reward async withdrawDelegatorReward( validatorAddress: string, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -52,14 +52,14 @@ export class DistributionService { async simulateToWithdrawDelegatorReward( validatorAddress: string, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -75,8 +75,8 @@ export class DistributionService { async buildWithdrawDelegatorRewardTxBuilder( validatorAddress: string, cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const baseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); if (!baseAccount) { @@ -101,9 +101,9 @@ export class DistributionService { buildMsgWithdrawDelegatorReward( delegatorAddress: string, validatorAddress: string, - ): proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward { + ): cosmosclient.proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward { const msgWithdrawDelegatorReward = - new proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward({ + new cosmosclient.proto.cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward({ delegator_address: delegatorAddress, validator_address: validatorAddress, }); @@ -114,8 +114,8 @@ export class DistributionService { async withdrawValidatorCommission( validatorAddress: string, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -145,14 +145,14 @@ export class DistributionService { async simulateToWithdrawValidatorCommission( validatorAddress: string, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -168,8 +168,8 @@ export class DistributionService { async buildWithdrawValidatorCommissionTxBuilder( validatorAddress: string, cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const baseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); if (!baseAccount) { @@ -190,9 +190,9 @@ export class DistributionService { buildMsgWithdrawValidatorCommission( validatorAddress: string, - ): proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission { + ): cosmosclient.proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission { const msgWithdrawValidatorCommission = - new proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission({ + new cosmosclient.proto.cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission({ validator_address: validatorAddress, }); return msgWithdrawValidatorCommission; diff --git a/projects/portal/src/app/models/cosmos/gentx.service.ts b/projects/portal/src/app/models/cosmos/gentx.service.ts index a0ff5b1c4..759f77d15 100644 --- a/projects/portal/src/app/models/cosmos/gentx.service.ts +++ b/projects/portal/src/app/models/cosmos/gentx.service.ts @@ -3,14 +3,14 @@ import { Key } from '../keys/key.model'; import { KeyService } from '../keys/key.service'; import { GentxData } from './gentx.model'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import Long from 'long'; @Injectable({ providedIn: 'root', }) export class GentxService { - constructor(private readonly cosmosSDK: CosmosSDKService, private readonly key: KeyService) {} + constructor(private readonly cosmosSDK: CosmosSDKService, private readonly key: KeyService) { } async gentx(key: Key, gentxData: GentxData): Promise<{ [k: string]: any }> { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); @@ -30,7 +30,7 @@ export class GentxService { console.log('gentxData.pubkey', gentxData.pubkey); const base64DecodedPublicKey = Uint8Array.from(Buffer.from(gentxData.pubkey, 'base64')); console.log('base64DecodedPublicKey', base64DecodedPublicKey); - const publicKey = new proto.cosmos.crypto.ed25519.PubKey({ + const publicKey = new cosmosclient.proto.cosmos.crypto.ed25519.PubKey({ key: base64DecodedPublicKey, }); const instanceToProtoAnyPublicKey = cosmosclient.codec.instanceToProtoAny(publicKey); @@ -60,12 +60,12 @@ export class GentxService { }, }; console.log('createValidatorTxData', createValidatorTxData); - const msgCreateValidator = new proto.cosmos.staking.v1beta1.MsgCreateValidator( + const msgCreateValidator = new cosmosclient.proto.cosmos.staking.v1beta1.MsgCreateValidator( createValidatorTxData, ); console.log('msgCreateValidator', msgCreateValidator); - const txBody = new proto.cosmos.tx.v1beta1.TxBody({ + const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgCreateValidator)], memo: `${gentxData.node_id}@${gentxData.ip}:26656`, timeout_height: Long.fromString('0'), @@ -74,13 +74,13 @@ export class GentxService { }); console.log('txBody', txBody); - const authInfo = new proto.cosmos.tx.v1beta1.AuthInfo({ + const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ signer_infos: [ { public_key: cosmosclient.codec.instanceToProtoAny(pubKey), mode_info: { single: { - mode: proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, + mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, }, }, sequence: Long.fromString('0'), diff --git a/projects/portal/src/app/models/cosmos/gov.application.service.ts b/projects/portal/src/app/models/cosmos/gov.application.service.ts index 6fc57f68e..e104e5d22 100644 --- a/projects/portal/src/app/models/cosmos/gov.application.service.ts +++ b/projects/portal/src/app/models/cosmos/gov.application.service.ts @@ -11,7 +11,7 @@ import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -28,7 +28,7 @@ export class GovApplicationService { private readonly gov: GovService, private readonly walletApplicationService: WalletApplicationService, private readonly walletService: WalletService, - ) {} + ) { } async openVoteFormDialog(proposalID: number): Promise { const txHash = await this.dialog @@ -47,7 +47,7 @@ export class GovApplicationService { } // WIP - async submitProposal(minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, gasRatio: number) { + async submitProposal(minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number) { const privateWallet: StoredWallet & { privateKey: string } = await this.walletApplicationService.openUnunifiKeyFormDialog(); if (!privateWallet || !privateWallet.privateKey) { @@ -64,8 +64,8 @@ export class GovApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); @@ -135,8 +135,8 @@ export class GovApplicationService { async Vote( proposalID: number, - voteOption: proto.cosmos.gov.v1beta1.VoteOption, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + voteOption: cosmosclient.proto.cosmos.gov.v1beta1.VoteOption, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { // get public key @@ -153,8 +153,8 @@ export class GovApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); @@ -221,8 +221,8 @@ export class GovApplicationService { async Deposit( proposalID: number, - amount: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { // get public key @@ -239,8 +239,8 @@ export class GovApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); diff --git a/projects/portal/src/app/models/cosmos/gov.service.ts b/projects/portal/src/app/models/cosmos/gov.service.ts index 868041340..e822c2847 100644 --- a/projects/portal/src/app/models/cosmos/gov.service.ts +++ b/projects/portal/src/app/models/cosmos/gov.service.ts @@ -6,7 +6,7 @@ import { CosmosWallet } from '../wallets/wallet.model'; import { SimulatedTxResultResponse } from './tx-common.model'; import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, rest, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; @@ -18,13 +18,13 @@ export class GovService { private readonly cosmosSDK: CosmosSDKService, private readonly key: KeyService, private readonly txCommonService: TxCommonService, - ) {} + ) { } // WIP Submit Proposal async SubmitProposal( keyType: KeyType, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey: Uint8Array, ): Promise { const txBuilder = await this.buildSubmitProposal(keyType, gas, fee, privateKey); @@ -33,15 +33,15 @@ export class GovService { async simulateToSubmitProposal( keyType: KeyType, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey: Uint8Array, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -56,8 +56,8 @@ export class GovService { async buildSubmitProposal( keyType: KeyType, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey: Uint8Array, ): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); @@ -69,7 +69,7 @@ export class GovService { const fromAddress = cosmosclient.AccAddress.fromPublicKey(pubKey); // get account info - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk, fromAddress) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -85,22 +85,22 @@ export class GovService { } // build tx - const msgProposal = new proto.cosmos.gov.v1beta1.MsgSubmitProposal({ + const msgProposal = new cosmosclient.proto.cosmos.gov.v1beta1.MsgSubmitProposal({ content: null, initial_deposit: [], proposer: fromAddress.toString(), }); - const txBody = new proto.cosmos.tx.v1beta1.TxBody({ + const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgProposal)], }); - const authInfo = new proto.cosmos.tx.v1beta1.AuthInfo({ + const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ signer_infos: [ { public_key: cosmosclient.codec.instanceToProtoAny(pubKey), mode_info: { single: { - mode: proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, + mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, }, }, sequence: baseAccount.sequence, @@ -123,10 +123,10 @@ export class GovService { // Vote async Vote( proposalID: number, - voteOption: proto.cosmos.gov.v1beta1.VoteOption, + voteOption: cosmosclient.proto.cosmos.gov.v1beta1.VoteOption, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -156,16 +156,16 @@ export class GovService { async simulateToVote( proposalID: number, - voteOption: proto.cosmos.gov.v1beta1.VoteOption, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + voteOption: cosmosclient.proto.cosmos.gov.v1beta1.VoteOption, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -181,10 +181,10 @@ export class GovService { async buildVoteTxBuilder( proposalID: number, - voteOption: proto.cosmos.gov.v1beta1.VoteOption, + voteOption: cosmosclient.proto.cosmos.gov.v1beta1.VoteOption, cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const baseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); if (!baseAccount) { @@ -205,9 +205,9 @@ export class GovService { buildMsgVote( proposalID: number, voterAddress: string, - voteOption: proto.cosmos.gov.v1beta1.VoteOption, - ): proto.cosmos.gov.v1beta1.MsgVote { - const msgVote = new proto.cosmos.gov.v1beta1.MsgVote({ + voteOption: cosmosclient.proto.cosmos.gov.v1beta1.VoteOption, + ): cosmosclient.proto.cosmos.gov.v1beta1.MsgVote { + const msgVote = new cosmosclient.proto.cosmos.gov.v1beta1.MsgVote({ proposal_id: Long.fromNumber(proposalID), voter: voterAddress, option: voteOption, @@ -218,10 +218,10 @@ export class GovService { // Deposit async Deposit( proposalID: number, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -251,16 +251,16 @@ export class GovService { async simulateToDeposit( proposalID: number, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -276,10 +276,10 @@ export class GovService { async buildDepositTxBuilder( proposalID: number, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const baseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); if (!baseAccount) { @@ -302,9 +302,9 @@ export class GovService { buildMsgDeposit( proposalID: number, depositerAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, - ): proto.cosmos.gov.v1beta1.MsgDeposit { - const msgDeposit = new proto.cosmos.gov.v1beta1.MsgDeposit({ + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + ): cosmosclient.proto.cosmos.gov.v1beta1.MsgDeposit { + const msgDeposit = new cosmosclient.proto.cosmos.gov.v1beta1.MsgDeposit({ proposal_id: Long.fromNumber(proposalID), depositor: depositerAddress, amount: [amount], diff --git a/projects/portal/src/app/models/cosmos/slashing.application.service.ts b/projects/portal/src/app/models/cosmos/slashing.application.service.ts index 3317a9f8c..ed22189db 100644 --- a/projects/portal/src/app/models/cosmos/slashing.application.service.ts +++ b/projects/portal/src/app/models/cosmos/slashing.application.service.ts @@ -9,7 +9,7 @@ import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -25,11 +25,11 @@ export class SlashingApplicationService { private readonly txCommonService: TxCommonService, private readonly walletService: WalletService, private readonly slashingService: SlashingService, - ) {} + ) { } async unjail( validatorAddress: string, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { // get public key @@ -46,8 +46,8 @@ export class SlashingApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); try { simulatedResultData = await this.slashingService.simulateToUnjail( @@ -110,7 +110,7 @@ export class SlashingApplicationService { // Note: feature for special customer async unjailSimple( validatorAddress: string, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, privateKey: string, ) { diff --git a/projects/portal/src/app/models/cosmos/slashing.service.ts b/projects/portal/src/app/models/cosmos/slashing.service.ts index 456fc2436..df439cf2c 100644 --- a/projects/portal/src/app/models/cosmos/slashing.service.ts +++ b/projects/portal/src/app/models/cosmos/slashing.service.ts @@ -2,20 +2,20 @@ import { CosmosWallet } from '../wallets/wallet.model'; import { SimulatedTxResultResponse } from './tx-common.model'; import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; @Injectable({ providedIn: 'root', }) export class SlashingService { - constructor(private readonly txCommonService: TxCommonService) {} + constructor(private readonly txCommonService: TxCommonService) { } async unjail( validatorAddress: string, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin | undefined, - fee: proto.cosmos.base.v1beta1.ICoin | undefined, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin | undefined, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin | undefined, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -40,14 +40,14 @@ export class SlashingService { async simulateToUnjail( validatorAddress: string, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -63,8 +63,8 @@ export class SlashingService { async buildUnjailTxBuilder( validatorAddress: string, cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin | null | undefined, - fee: proto.cosmos.base.v1beta1.ICoin | null | undefined, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null | undefined, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null | undefined, ): Promise { const valAddress = cosmosclient.ValAddress.fromPublicKey(cosmosPublicKey); if (valAddress.toString() !== validatorAddress) { @@ -85,8 +85,8 @@ export class SlashingService { return txBuilder; } - buildMsgUnjail(validatorAddress: string): proto.cosmos.slashing.v1beta1.MsgUnjail { - const msgUnjail = new proto.cosmos.slashing.v1beta1.MsgUnjail({ + buildMsgUnjail(validatorAddress: string): cosmosclient.proto.cosmos.slashing.v1beta1.MsgUnjail { + const msgUnjail = new cosmosclient.proto.cosmos.slashing.v1beta1.MsgUnjail({ validator_addr: validatorAddress, }); return msgUnjail; diff --git a/projects/portal/src/app/models/cosmos/staking.application.service.ts b/projects/portal/src/app/models/cosmos/staking.application.service.ts index 0d87c1495..b0f442966 100644 --- a/projects/portal/src/app/models/cosmos/staking.application.service.ts +++ b/projects/portal/src/app/models/cosmos/staking.application.service.ts @@ -16,7 +16,7 @@ import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators, InlineResponse20050, @@ -30,8 +30,8 @@ export interface InterfaceCreateValidatorSimpleOptions { disableSimulate?: boolean; } export interface InterfaceGasAndFee { - gas: proto.cosmos.base.v1beta1.ICoin; - fee: proto.cosmos.base.v1beta1.ICoin | null; + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null; } @Injectable({ @@ -46,7 +46,7 @@ export class StakingApplicationService { private readonly staking: StakingService, private readonly walletService: WalletService, private readonly walletApplicationService: WalletApplicationService, - ) {} + ) { } async openDelegateMenuDialog(validator: InlineResponse20041Validators): Promise { await this.dialog @@ -81,7 +81,7 @@ export class StakingApplicationService { async handleSimulateToCreateValidator( createValidatorData: CreateValidatorData, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, privateKey: Uint8Array, disableSimulate?: boolean, @@ -116,7 +116,7 @@ export class StakingApplicationService { async createValidatorSimple( createValidatorData: CreateValidatorData, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKeyString: string, gasRatio: number, options?: InterfaceCreateValidatorSimpleOptions, @@ -175,7 +175,7 @@ export class StakingApplicationService { async createValidator( createValidatorData: CreateValidatorData, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { const privateWallet: StoredWallet & { privateKey: string } = @@ -199,8 +199,8 @@ export class StakingApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); @@ -272,8 +272,8 @@ export class StakingApplicationService { async createDelegate( validatorAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { // get public key @@ -290,8 +290,8 @@ export class StakingApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); @@ -367,8 +367,8 @@ export class StakingApplicationService { async Redelegate( validatorAddressBefore: string, validatorAddressAfter: string, - amount: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { // get public key @@ -385,8 +385,8 @@ export class StakingApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); @@ -463,8 +463,8 @@ export class StakingApplicationService { async undelegate( validatorAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { // get public key @@ -481,8 +481,8 @@ export class StakingApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); diff --git a/projects/portal/src/app/models/cosmos/staking.service.ts b/projects/portal/src/app/models/cosmos/staking.service.ts index 33b88ba67..7c3cf4d66 100644 --- a/projects/portal/src/app/models/cosmos/staking.service.ts +++ b/projects/portal/src/app/models/cosmos/staking.service.ts @@ -7,7 +7,7 @@ import { CreateValidatorData } from './staking.model'; import { SimulatedTxResultResponse } from './tx-common.model'; import { TxCommonService } from './tx-common.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, rest, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import BigNumber from 'bignumber.js'; import Long from 'long'; @@ -19,14 +19,14 @@ export class StakingService { constructor( private readonly cosmosSDK: CosmosSDKService, private readonly txCommonService: TxCommonService, - ) {} + ) { } // Create Validator async createValidator( keyType: KeyType, createValidatorData: CreateValidatorData, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin | null, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null, privateKey: Uint8Array, ): Promise { const txBuilder = await this.buildCreateValidator( @@ -43,15 +43,15 @@ export class StakingService { async simulateToCreateValidator( keyType: KeyType, createValidatorData: CreateValidatorData, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey: Uint8Array, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -67,8 +67,8 @@ export class StakingService { } private makeCommissionValues( - commission: proto.cosmos.staking.v1beta1.ICommissionRates, - ): proto.cosmos.staking.v1beta1.ICommissionRates { + commission: cosmosclient.proto.cosmos.staking.v1beta1.ICommissionRates, + ): cosmosclient.proto.cosmos.staking.v1beta1.ICommissionRates { const pairs: [string, string][] = Object.entries(commission).map((pair: [string, string]) => { const [key, value] = pair; const bnValue = new BigNumber(value); @@ -85,8 +85,8 @@ export class StakingService { async buildCreateValidator( keyType: KeyType, createValidatorData: CreateValidatorData, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin | null, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null, privateKey: Uint8Array, ): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); @@ -99,7 +99,7 @@ export class StakingService { const valAddress = cosmosclient.ValAddress.fromPublicKey(pubKey); // get account info - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk, accAddress) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -123,7 +123,7 @@ export class StakingService { } const pubKeyJson = JSON.parse(createValidatorData.pubkey); - const cosmosValConsPublicKey = new proto.cosmos.crypto.ed25519.PubKey({ key: pubKeyJson.key }); + const cosmosValConsPublicKey = new cosmosclient.proto.cosmos.crypto.ed25519.PubKey({ key: pubKeyJson.key }); const packedAnyCosmosValConsPublicKey = cosmosclient.codec.instanceToProtoAny(cosmosValConsPublicKey); @@ -151,22 +151,22 @@ export class StakingService { amount: createValidatorData.amount, }, }; - const msgCreateValidator = new proto.cosmos.staking.v1beta1.MsgCreateValidator( + const msgCreateValidator = new cosmosclient.proto.cosmos.staking.v1beta1.MsgCreateValidator( createValidatorTxData, ); - const txBody = new proto.cosmos.tx.v1beta1.TxBody({ + const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgCreateValidator)], memo: `${createValidatorData.node_id}@${createValidatorData.ip}:26656`, }); - const authInfo = new proto.cosmos.tx.v1beta1.AuthInfo({ + const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ signer_infos: [ { public_key: cosmosclient.codec.instanceToProtoAny(pubKey), mode_info: { single: { - mode: proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, + mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, }, }, sequence: baseAccount.sequence, @@ -189,10 +189,10 @@ export class StakingService { // Create Delegate async createDelegate( validatorAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -222,16 +222,16 @@ export class StakingService { async simulateToCreateDelegate( validatorAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -247,10 +247,10 @@ export class StakingService { async buildCreateDelegateTxBuilder( validatorAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const baseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); if (!baseAccount) { @@ -272,9 +272,9 @@ export class StakingService { buildMsgDelegate( delegatorAddress: string, validatorAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, - ): proto.cosmos.staking.v1beta1.MsgDelegate { - const msgDelegate = new proto.cosmos.staking.v1beta1.MsgDelegate({ + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + ): cosmosclient.proto.cosmos.staking.v1beta1.MsgDelegate { + const msgDelegate = new cosmosclient.proto.cosmos.staking.v1beta1.MsgDelegate({ delegator_address: delegatorAddress, validator_address: validatorAddress, amount, @@ -286,10 +286,10 @@ export class StakingService { async redelegate( validatorAddressBefore: string, validatorAddressAfter: string, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -322,16 +322,16 @@ export class StakingService { async simulateToRedelegate( validatorAddressBefore: string, validatorAddressAfter: string, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -349,10 +349,10 @@ export class StakingService { async buildRedelegateTxBuilder( validatorAddressBefore: string, validatorAddressAfter: string, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const baseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); if (!baseAccount) { @@ -383,9 +383,9 @@ export class StakingService { delegatorAddress: string, validatorAddressBefore: string, validatorAddressAfter: string, - amount: proto.cosmos.base.v1beta1.ICoin, - ): proto.cosmos.staking.v1beta1.MsgBeginRedelegate { - const msgRedelegate = new proto.cosmos.staking.v1beta1.MsgBeginRedelegate({ + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + ): cosmosclient.proto.cosmos.staking.v1beta1.MsgBeginRedelegate { + const msgRedelegate = new cosmosclient.proto.cosmos.staking.v1beta1.MsgBeginRedelegate({ delegator_address: delegatorAddress, validator_src_address: validatorAddressBefore, validator_dst_address: validatorAddressAfter, @@ -397,10 +397,10 @@ export class StakingService { // Delete Delegate async undelegate( validatorAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -430,16 +430,16 @@ export class StakingService { async simulateToUndelegate( validatorAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -455,10 +455,10 @@ export class StakingService { async buildUndelegateTxBuilder( validatorAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const baseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); if (!baseAccount) { @@ -480,9 +480,9 @@ export class StakingService { buildMsgUndelegate( delegatorAddress: string, validatorAddress: string, - amount: proto.cosmos.base.v1beta1.ICoin, - ): proto.cosmos.staking.v1beta1.MsgUndelegate { - const msgUndelegate = new proto.cosmos.staking.v1beta1.MsgUndelegate({ + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + ): cosmosclient.proto.cosmos.staking.v1beta1.MsgUndelegate { + const msgUndelegate = new cosmosclient.proto.cosmos.staking.v1beta1.MsgUndelegate({ delegator_address: delegatorAddress, validator_address: validatorAddress, amount, diff --git a/projects/portal/src/app/models/cosmos/tx-common.model.ts b/projects/portal/src/app/models/cosmos/tx-common.model.ts index 1621d0fa9..ca3e07f9d 100644 --- a/projects/portal/src/app/models/cosmos/tx-common.model.ts +++ b/projects/portal/src/app/models/cosmos/tx-common.model.ts @@ -1,11 +1,11 @@ -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20049 } from '@cosmos-client/core/esm/openapi'; export type SimulatedTxResultResponse = { simulatedResultData?: InlineResponse20049; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - estimatedGasUsedWithMargin: proto.cosmos.base.v1beta1.ICoin; - estimatedFeeWithMargin: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + estimatedGasUsedWithMargin: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + estimatedFeeWithMargin: cosmosclient.proto.cosmos.base.v1beta1.ICoin; }; export type MetaMaskTx = { diff --git a/projects/portal/src/app/models/cosmos/tx-common.service.ts b/projects/portal/src/app/models/cosmos/tx-common.service.ts index ce887a898..280106e55 100644 --- a/projects/portal/src/app/models/cosmos/tx-common.service.ts +++ b/projects/portal/src/app/models/cosmos/tx-common.service.ts @@ -10,7 +10,7 @@ import { CosmosWallet, StoredWallet, WalletType } from '../wallets/wallet.model' import { SimulatedTxResultResponse } from './tx-common.model'; import { Injectable } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; @@ -24,7 +24,7 @@ export class TxCommonService { private readonly walletAppService: WalletApplicationService, private readonly keplrService: KeplrService, private readonly metaMaskService: MetaMaskService, - ) {} + ) { } canonicalizeAccAddress(address: string) { const canonicalized = address.replace(/\s+/g, ''); @@ -32,9 +32,9 @@ export class TxCommonService { } validateBalanceBeforeSimulation( - usageAmount: proto.cosmos.base.v1beta1.ICoin[], - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, - balances: proto.cosmos.base.v1beta1.ICoin[], + usageAmount: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], ) { const feeDenom = minimumGasPrice.denom; const simulationFeeAmount = 1; @@ -54,10 +54,10 @@ export class TxCommonService { async getBaseAccount( cosmosPublicKey: cosmosclient.PubKey, - ): Promise { + ): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); const accAddress = cosmosclient.AccAddress.fromPublicKey(cosmosPublicKey); - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk, accAddress) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -74,9 +74,9 @@ export class TxCommonService { async getBaseAccountFromAddress( address: cosmosclient.AccAddress, - ): Promise { + ): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk, address) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -94,25 +94,25 @@ export class TxCommonService { async buildTxBuilder( messages: any[], cosmosPublicKey: cosmosclient.PubKey, - baseAccount: proto.cosmos.auth.v1beta1.BaseAccount, - gas: proto.cosmos.base.v1beta1.ICoin | null | undefined, - fee: proto.cosmos.base.v1beta1.ICoin | null | undefined, + baseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null | undefined, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null | undefined, ): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); - const packedAnyMessages: proto.google.protobuf.IAny[] = messages.map((message) => + const packedAnyMessages: cosmosclient.proto.google.protobuf.IAny[] = messages.map((message) => cosmosclient.codec.instanceToProtoAny(message), ); - const txBody = new proto.cosmos.tx.v1beta1.TxBody({ + const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: packedAnyMessages, }); - const authInfo = new proto.cosmos.tx.v1beta1.AuthInfo({ + const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ signer_infos: [ { public_key: cosmosclient.codec.instanceToProtoAny(cosmosPublicKey), mode_info: { single: { - mode: proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, + mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, }, }, sequence: baseAccount.sequence, @@ -129,7 +129,7 @@ export class TxCommonService { async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, currentCosmosWallet: CosmosWallet, privateKey?: string, ): Promise { @@ -155,7 +155,7 @@ export class TxCommonService { async signTxWithPrivateKey( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, privateKey?: string, ): Promise { let cosmosPrivateKey: cosmosclient.PrivKey | undefined; @@ -188,7 +188,7 @@ export class TxCommonService { async signTxWithKeplr( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { const signedTxBuilder = await this.keplrService.signTx(txBuilder, signerBaseAccount); return signedTxBuilder; @@ -197,7 +197,7 @@ export class TxCommonService { // Todo: This is dummy function and need to implement later. signTxWithLedger( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): cosmosclient.TxBuilder { throw Error('Currently signing with Ledger is not supported!'); } @@ -205,14 +205,14 @@ export class TxCommonService { // Todo: This is dummy function and need to implement later. signTxWithKeyStation( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): cosmosclient.TxBuilder { throw Error('Currently signing with KeyStation is not supported!'); } async signTxWithMetaMask( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { const signedTxBuilder = await this.metaMaskService.signTx(txBuilder, signerBaseAccount); return signedTxBuilder; @@ -220,7 +220,7 @@ export class TxCommonService { async simulateTx( txBuilder: cosmosclient.TxBuilder, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { if (minimumGasPrice.amount == '0' || !gasRatio) { @@ -238,7 +238,7 @@ export class TxCommonService { } const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); - // restore json from txBuilder + // cosmosclient.rest ore json from txBuilder const txForSimulation = txBuilder.toProtoJSON() as any; console.log(txForSimulation); @@ -254,7 +254,7 @@ export class TxCommonService { } // simulate - const simulatedResult = await rest.tx.simulate(sdk, { + const simulatedResult = await cosmosclient.rest.tx.simulate(sdk, { tx: txForSimulation, }); console.log('simulatedResult', simulatedResult); @@ -297,9 +297,9 @@ export class TxCommonService { console.log(txBuilder); // broadcast tx - const result = await rest.tx.broadcastTx(sdk, { + const result = await cosmosclient.rest.tx.broadcastTx(sdk, { tx_bytes: txBuilder.txBytes(), - mode: rest.tx.BroadcastTxMode.Block, + mode: cosmosclient.rest.tx.BroadcastTxMode.Block, }); // check broadcast tx error diff --git a/projects/portal/src/app/models/db.service.ts b/projects/portal/src/app/models/db.service.ts index 7a03f1817..6394ae0fe 100644 --- a/projects/portal/src/app/models/db.service.ts +++ b/projects/portal/src/app/models/db.service.ts @@ -1,7 +1,7 @@ import { KeyType } from './keys/key.model'; import { WalletType } from './wallets/wallet.model'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { PubKey } from '@cosmos-client/core/esm/types'; import Dexie from 'dexie'; @@ -34,7 +34,7 @@ export class DbService { let cosmosPublicKey: PubKey; switch (key_type) { case KeyType.secp256k1: - cosmosPublicKey = new proto.cosmos.crypto.secp256k1.PubKey({ + cosmosPublicKey = new cosmosclient.proto.cosmos.crypto.secp256k1.PubKey({ key: Uint8Array.from(Buffer.from(public_key, 'hex')), }); break; diff --git a/projects/portal/src/app/models/keys/key.infrastructure.service.ts b/projects/portal/src/app/models/keys/key.infrastructure.service.ts index 39b3aced0..c92d9629d 100644 --- a/projects/portal/src/app/models/keys/key.infrastructure.service.ts +++ b/projects/portal/src/app/models/keys/key.infrastructure.service.ts @@ -3,7 +3,7 @@ import { DbService } from '../db.service'; import { Key, KeyType } from './key.model'; import { IKeyInfrastructure } from './key.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import Dexie from 'dexie'; @Injectable({ @@ -20,7 +20,7 @@ export class KeyInfrastructureService implements IKeyInfrastructure { const privKeyBuffer = Buffer.from(privateKey); switch (type) { case KeyType.secp256k1: - return new proto.cosmos.crypto.secp256k1.PrivKey({ key: privKeyBuffer }); + return new cosmosclient.proto.cosmos.crypto.secp256k1.PrivKey({ key: privKeyBuffer }); case KeyType.ed25519: throw Error('not supported yet'); case KeyType.sr25519: @@ -34,7 +34,7 @@ export class KeyInfrastructureService implements IKeyInfrastructure { const pubKeyBuffer = Buffer.from(publicKey, 'hex'); switch (type) { case KeyType.secp256k1: - return new proto.cosmos.crypto.secp256k1.PubKey({ key: pubKeyBuffer }); + return new cosmosclient.proto.cosmos.crypto.secp256k1.PubKey({ key: pubKeyBuffer }); case KeyType.ed25519: throw Error('not supported yet'); case KeyType.sr25519: diff --git a/projects/portal/src/app/models/keys/key.service.ts b/projects/portal/src/app/models/keys/key.service.ts index 6f71895ac..ca2e82eac 100644 --- a/projects/portal/src/app/models/keys/key.service.ts +++ b/projects/portal/src/app/models/keys/key.service.ts @@ -1,7 +1,7 @@ import { KeyInfrastructureService } from './key.infrastructure.service'; import { Key, KeyType } from './key.model'; import { Injectable } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export interface IKeyInfrastructure { getPrivKey(type: KeyType, privateKey: Uint8Array): cosmosclient.PrivKey; diff --git a/projects/portal/src/app/models/wallets/keplr/keplr.infrastructure.service.ts b/projects/portal/src/app/models/wallets/keplr/keplr.infrastructure.service.ts index bbc0a6010..6df5ad530 100644 --- a/projects/portal/src/app/models/wallets/keplr/keplr.infrastructure.service.ts +++ b/projects/portal/src/app/models/wallets/keplr/keplr.infrastructure.service.ts @@ -5,7 +5,7 @@ import { StoredWallet, WalletType } from '../wallet.model'; import { IKeplrInfrastructureService } from './keplr.service'; import { Injectable } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ChainInfo, Key, Window as KeplrWindow } from '@keplr-wallet/types'; import { LoadingDialogService } from 'ng-loading-dialog'; @@ -17,7 +17,7 @@ export interface signKeplr { declare global { // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface Window extends KeplrWindow {} + interface Window extends KeplrWindow { } } @Injectable({ @@ -28,7 +28,7 @@ export class KeplrInfrastructureService implements IKeplrInfrastructureService { private readonly loadingDialog: LoadingDialogService, private snackBar: MatSnackBar, private configService: ConfigService, - ) {} + ) { } private async getKey(): Promise { if (!window.keplr) { @@ -188,7 +188,7 @@ export class KeplrInfrastructureService implements IKeplrInfrastructureService { async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { const signDoc = txBuilder.signDoc(signerBaseAccount.account_number); const signKeplr = await this.signDirect( diff --git a/projects/portal/src/app/models/wallets/keplr/keplr.service.ts b/projects/portal/src/app/models/wallets/keplr/keplr.service.ts index aa7f88aa4..aedab74fc 100644 --- a/projects/portal/src/app/models/wallets/keplr/keplr.service.ts +++ b/projects/portal/src/app/models/wallets/keplr/keplr.service.ts @@ -1,13 +1,13 @@ import { StoredWallet } from '../wallet.model'; import { KeplrInfrastructureService } from './keplr.infrastructure.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export interface IKeplrInfrastructureService { connectWallet: () => Promise; signTx: ( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ) => Promise; } @@ -27,7 +27,7 @@ export class KeplrService { async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { return await this.iKeplrInfrastructureService.signTx(txBuilder, signerBaseAccount); } diff --git a/projects/portal/src/app/models/wallets/metamask/metamask.infrastructure.service.ts b/projects/portal/src/app/models/wallets/metamask/metamask.infrastructure.service.ts index de8a23337..b4924e51e 100644 --- a/projects/portal/src/app/models/wallets/metamask/metamask.infrastructure.service.ts +++ b/projects/portal/src/app/models/wallets/metamask/metamask.infrastructure.service.ts @@ -4,7 +4,7 @@ import { KeyType } from '../../keys/key.model'; import { StoredWallet, WalletType } from '../wallet.model'; import { IMetaMaskInfrastructureService } from './metamask.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import detectEthereumProvider from '@metamask/detect-provider'; import { ethers } from 'ethers'; import { take } from 'rxjs/operators'; @@ -13,7 +13,7 @@ import { take } from 'rxjs/operators'; providedIn: 'root', }) export class MetaMaskInfrastructureService implements IMetaMaskInfrastructureService { - constructor(private readonly configService: ConfigService) {} + constructor(private readonly configService: ConfigService) { } private messageToDigest(message: string): Uint8Array { const messageHash = ethers.utils.hashMessage(message); @@ -99,7 +99,7 @@ export class MetaMaskInfrastructureService implements IMetaMaskInfrastructureSer async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { const txJson = txBuilder.toProtoJSON() as any; diff --git a/projects/portal/src/app/models/wallets/metamask/metamask.service.ts b/projects/portal/src/app/models/wallets/metamask/metamask.service.ts index 541177e31..1861fb043 100644 --- a/projects/portal/src/app/models/wallets/metamask/metamask.service.ts +++ b/projects/portal/src/app/models/wallets/metamask/metamask.service.ts @@ -1,13 +1,13 @@ import { StoredWallet } from '../wallet.model'; import { MetaMaskInfrastructureService } from './metamask.infrastructure.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export interface IMetaMaskInfrastructureService { connectWallet: () => Promise; signTx: ( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ) => Promise; } @@ -27,7 +27,7 @@ export class MetaMaskService { async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { return await this.iMetaMaskInfrastructureService.signTx(txBuilder, signerBaseAccount); } diff --git a/projects/portal/src/app/models/wallets/wallet.infrastructure.service.ts b/projects/portal/src/app/models/wallets/wallet.infrastructure.service.ts index 5d0a66429..effa25639 100644 --- a/projects/portal/src/app/models/wallets/wallet.infrastructure.service.ts +++ b/projects/portal/src/app/models/wallets/wallet.infrastructure.service.ts @@ -3,7 +3,7 @@ import { KeyType } from '../keys/key.model'; import { CosmosWallet, StoredWallet, Wallet, WalletType } from './wallet.model'; import { IWalletInfrastructure } from './wallet.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import Dexie from 'dexie'; import { BehaviorSubject } from 'rxjs'; @@ -85,7 +85,7 @@ export class WalletInfrastructureService implements IWalletInfrastructure { } convertStoredWalletToCosmosWallet(storedWallet: StoredWallet): CosmosWallet { - const public_key: CosmosWallet['public_key'] = new proto.cosmos.crypto.secp256k1.PubKey({ + const public_key: CosmosWallet['public_key'] = new cosmosclient.proto.cosmos.crypto.secp256k1.PubKey({ key: Uint8Array.from(Buffer.from(storedWallet.public_key, 'hex')), }); const address: cosmosclient.AccAddress = cosmosclient.AccAddress.fromString( diff --git a/projects/portal/src/app/models/wallets/wallet.model.ts b/projects/portal/src/app/models/wallets/wallet.model.ts index 496b48f89..5bf54996c 100644 --- a/projects/portal/src/app/models/wallets/wallet.model.ts +++ b/projects/portal/src/app/models/wallets/wallet.model.ts @@ -1,5 +1,5 @@ import { KeyType } from '../keys/key.model'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { PubKey } from '@cosmos-client/core/esm/types'; // Note: Now, only ununifi is supported. diff --git a/projects/portal/src/app/pages/accounts/account/account.component.ts b/projects/portal/src/app/pages/accounts/account/account.component.ts index c16cd374b..fcf80f551 100644 --- a/projects/portal/src/app/pages/accounts/account/account.component.ts +++ b/projects/portal/src/app/pages/accounts/account/account.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, rest, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable, of } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -14,12 +14,12 @@ import { map, mergeMap } from 'rxjs/operators'; export class AccountComponent implements OnInit { address$: Observable; account$: Observable< - | proto.cosmos.auth.v1beta1.BaseAccount - | proto.cosmos.vesting.v1beta1.ContinuousVestingAccount + | cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount | unknown | undefined >; - balances$: Observable; + balances$: Observable; constructor( private route: ActivatedRoute, @@ -47,7 +47,7 @@ export class AccountComponent implements OnInit { if (address === undefined) { return of(undefined); } - return rest.auth + return cosmosclient.rest.auth .account(sdk.rest, address) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -66,10 +66,10 @@ export class AccountComponent implements OnInit { if (address === undefined) { return of([]); } - return rest.bank.allBalances(sdk.rest, address).then((res) => res.data.balances || []); + return cosmosclient.rest.bank.allBalances(sdk.rest, address).then((res) => res.data.balances || []); }), ); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts b/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts index 11f71cec1..a547d8b86 100644 --- a/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts +++ b/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosDistributionV1beta1QueryValidatorSlashesResponse, InlineResponse20022, @@ -57,7 +57,7 @@ export class DistributionComponent implements OnInit { if (accAddress === undefined || valAddress === undefined) { return of(undefined); } - return rest.distribution.validatorCommission(sdk.rest, valAddress).then((res) => res.data); + return cosmosclient.rest.distribution.validatorCommission(sdk.rest, valAddress).then((res) => res.data); }), ); @@ -66,7 +66,7 @@ export class DistributionComponent implements OnInit { if (accAddress === undefined || valAddress === undefined) { return of(undefined); } - return rest.distribution + return cosmosclient.rest.distribution .validatorOutstandingRewards(sdk.rest, valAddress) .then((res) => res.data); }), @@ -77,12 +77,12 @@ export class DistributionComponent implements OnInit { if (accAddress === undefined || valAddress === undefined) { return of(undefined); } - return rest.distribution + return cosmosclient.rest.distribution .validatorSlashes(sdk.rest, valAddress, '1', '2') // Todo: '2' must be fixed to latest block height and add pagination support! .then((res) => res.data); }), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/accounts/account/staking/staking.component.ts b/projects/portal/src/app/pages/accounts/account/staking/staking.component.ts index 303809992..4448a0336 100644 --- a/projects/portal/src/app/pages/accounts/account/staking/staking.component.ts +++ b/projects/portal/src/app/pages/accounts/account/staking/staking.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse, QueryValidatorDelegationsResponseIsResponseTypeForTheQueryValidatorDelegationsRPCMethod, @@ -58,7 +58,7 @@ export class StakingComponent implements OnInit { if (accAddress === undefined) { return of(undefined); } - return rest.distribution + return cosmosclient.rest.distribution .delegationTotalRewards(sdk.rest, accAddress) .then((res) => res.data); }), @@ -66,11 +66,11 @@ export class StakingComponent implements OnInit { /* this.eachRewards$ = combined$.pipe( - mergeMap(([sdk, accAddress, valAddress]) => rest.cosmos.distribution.delegationRewards(sdk.rest, accAddress, valAddress)), + mergeMap(([sdk, accAddress, valAddress]) => cosmosclient.rest.cosmos.distribution.delegationRewards(sdk.rest, accAddress, valAddress)), map((res) => res.data), ); */ } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/accounts/account/txs/txs.component.ts b/projects/portal/src/app/pages/accounts/account/txs/txs.component.ts index 70709f02e..c174f75a4 100644 --- a/projects/portal/src/app/pages/accounts/account/txs/txs.component.ts +++ b/projects/portal/src/app/pages/accounts/account/txs/txs.component.ts @@ -1,7 +1,7 @@ import { CosmosSDKService } from '../../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, rest, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosTxV1beta1GetTxsEventResponse } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -20,7 +20,7 @@ export class TxsComponent implements OnInit { const sdk$ = this.cosmosSDK.sdk$; this.txsWithPagination$ = combineLatest([sdk$, this.address$]).pipe( mergeMap(([sdk, address]) => { - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.sender='${address}'`], @@ -38,5 +38,5 @@ export class TxsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/accounts/create/simple/simple.component.ts b/projects/portal/src/app/pages/accounts/create/simple/simple.component.ts index 8bcbaba29..b683f65a0 100644 --- a/projects/portal/src/app/pages/accounts/create/simple/simple.component.ts +++ b/projects/portal/src/app/pages/accounts/create/simple/simple.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import * as bip39 from 'bip39'; import { KeyType } from 'projects/portal/src/app/models/keys/key.model'; import { StoredWallet, WalletType } from 'projects/portal/src/app/models/wallets/wallet.model'; diff --git a/projects/portal/src/app/pages/auction/auction.component.ts b/projects/portal/src/app/pages/auction/auction.component.ts index 779c935b4..fe26a9e14 100644 --- a/projects/portal/src/app/pages/auction/auction.component.ts +++ b/projects/portal/src/app/pages/auction/auction.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { combineLatest, Observable, timer } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; -import { rest } from 'ununifi-client'; +import cosmosclient from 'ununifi-client'; import { InlineResponse2002Params } from 'ununifi-client/esm/openapi'; @Component({ @@ -16,10 +16,10 @@ export class AuctionComponent implements OnInit { const timer$ = timer(0, 60 * 1000); this.params$ = combineLatest([this.cosmosSDK.sdk$, timer$]).pipe( - mergeMap(([sdk, _]) => rest.ununifi.auction.params(sdk.rest)), + mergeMap(([sdk, _]) => cosmosclient.rest.ununifi.auction.params(sdk.rest)), map((res) => res.data.params!), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts b/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts index 359cbb67e..f8331084c 100644 --- a/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -71,5 +71,5 @@ export class AuctionComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts b/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts index 87e3f91b5..ecc89520b 100644 --- a/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { AuctionApplicationService } from 'projects/portal/src/app/models/auctions/auction.application.service'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; @@ -22,7 +22,7 @@ export class PlaceBidComponent implements OnInit { auction$: Observable; endTime$: Observable; maxEndTime$: Observable; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; constructor( private route: ActivatedRoute, @@ -86,7 +86,7 @@ export class PlaceBidComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit($event: PlaceBidOnSubmitEvent) { this.auctionApplicationService.placeBid( diff --git a/projects/portal/src/app/pages/auction/auctions/auctions.component.ts b/projects/portal/src/app/pages/auction/auctions/auctions.component.ts index 1046bb457..8d8ed6cdb 100644 --- a/projects/portal/src/app/pages/auction/auctions/auctions.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auctions.component.ts @@ -1,7 +1,7 @@ import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { BehaviorSubject, combineLatest, Observable, of, timer } from 'rxjs'; import { filter, map, mergeMap, switchMap } from 'rxjs/operators'; import { rest, ununifi, google } from 'ununifi-client'; @@ -113,7 +113,7 @@ export class AuctionsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } appPaginationChanged(pageEvent: PageEvent): void { this.pageSize$.next(pageEvent.pageSize); diff --git a/projects/portal/src/app/pages/balance/balance.component.ts b/projects/portal/src/app/pages/balance/balance.component.ts index 3fdc5e062..733095ee6 100644 --- a/projects/portal/src/app/pages/balance/balance.component.ts +++ b/projects/portal/src/app/pages/balance/balance.component.ts @@ -8,7 +8,7 @@ import { convertUnknownAccountToTypedAccount, } from '../../utils/converter'; import { Component, OnInit } from '@angular/core'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { PubKey } from '@cosmos-client/core/esm/types'; import { combineLatest, Observable, of } from 'rxjs'; @@ -33,27 +33,27 @@ export class BalanceComponent implements OnInit { valAddress$: Observable; cosmosUnknownAccount$: Observable; cosmosAccount$: Observable< - | proto.cosmos.auth.v1beta1.BaseAccount - | proto.cosmos.vesting.v1beta1.BaseVestingAccount - | proto.cosmos.vesting.v1beta1.ContinuousVestingAccount - | proto.cosmos.vesting.v1beta1.DelayedVestingAccount - | proto.cosmos.vesting.v1beta1.PeriodicVestingAccount - | proto.cosmos.vesting.v1beta1.PermanentLockedAccount - | proto.cosmos.auth.v1beta1.ModuleAccount + | cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount + | cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount | null | undefined >; - cosmosBaseAccount$: Observable; + cosmosBaseAccount$: Observable; accountTypeName$: Observable; - balances$: Observable; + balances$: Observable; faucets$: Observable< | { - hasFaucet: boolean; - faucetURL: string; - denom: string; - creditAmount: number; - maxCredit: number; - }[] + hasFaucet: boolean; + faucetURL: string; + denom: string; + creditAmount: number; + maxCredit: number; + }[] | undefined >; nodeInfo$: Observable; @@ -102,7 +102,7 @@ export class BalanceComponent implements OnInit { if (!cosmosAccAddress) { return of(cosmosAccAddress); } - return rest.auth + return cosmosclient.rest.auth .account(sdk.rest, cosmosAccAddress) .then((res) => { console.log(res.data.account); @@ -135,7 +135,7 @@ export class BalanceComponent implements OnInit { if (!cosmosAccAddress) { return of(cosmosAccAddress); } - return rest.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, cosmosAccAddress) .then((res) => res.data.balances) .catch((error) => { @@ -177,9 +177,9 @@ export class BalanceComponent implements OnInit { }), ); this.nodeInfo$ = sdk$.pipe( - mergeMap((sdk) => rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts b/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts index 8dd8e101c..47548663d 100644 --- a/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts +++ b/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts @@ -3,7 +3,7 @@ import { BankApplicationService } from '../../../../models/cosmos/bank.applicati import { SendOnSubmitEvent } from '../../../../views/cosmos/bank/send/send.component'; import { Component, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; import { WalletService } from 'projects/portal/src/app/models/wallets/wallet.service'; @@ -17,9 +17,9 @@ import { map, mergeMap, filter } from 'rxjs/operators'; }) export class SendComponent implements OnInit { currentStoredWallet$: Observable; - coins$: Observable; - amount$: Observable; - minimumGasPrices$: Observable; + coins$: Observable; + amount$: Observable; + minimumGasPrices$: Observable; constructor( private readonly cosmosSDK: CosmosSDKService, @@ -36,7 +36,7 @@ export class SendComponent implements OnInit { ); this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => rest.bank.allBalances(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), map((result) => result.data.balances), ); @@ -52,7 +52,7 @@ export class SendComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmit($event: SendOnSubmitEvent) { if ($event.amount.length === 0) { diff --git a/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts b/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts index e4baa626f..2bbea8378 100644 --- a/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts +++ b/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts @@ -1,7 +1,7 @@ import { CosmosSDKService } from '../../../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038, InlineResponse20041 } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -27,15 +27,15 @@ export class DelegatorComponent implements OnInit { const combined$ = combineLatest([this.cosmosSDK.sdk$, address$]); this.delegations$ = combined$.pipe( - mergeMap(([sdk, address]) => rest.staking.delegatorDelegations(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorDelegations(sdk.rest, address)), map((res) => res.data), ); this.validators$ = combined$.pipe( - mergeMap(([sdk, address]) => rest.staking.delegatorValidators(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorValidators(sdk.rest, address)), map((res) => res.data), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts b/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts index f6d07cd12..32018f1e4 100644 --- a/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts +++ b/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts @@ -1,7 +1,7 @@ import { CosmosSDKService } from '../../../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import { Observable, of, combineLatest } from 'rxjs'; import { map, mergeMap, catchError } from 'rxjs/operators'; @@ -23,7 +23,7 @@ export class ValidatorComponent implements OnInit { const combined$ = combineLatest([this.cosmosSDK.sdk$, validatorAddress$]); this.validator$ = combined$.pipe( - mergeMap(([sdk, address]) => rest.staking.validator(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.staking.validator(sdk.rest, address)), map((result) => result.data.validator!), catchError((error) => { console.error(error); @@ -32,5 +32,5 @@ export class ValidatorComponent implements OnInit { ); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts b/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts index e16b5fafe..efaec5d27 100644 --- a/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts +++ b/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts @@ -1,6 +1,6 @@ import { CosmosSDKService } from '../../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod } from '@cosmos-client/core/esm/openapi'; import { Observable, from } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -15,10 +15,10 @@ export class ValidatorsComponent implements OnInit { constructor(private cosmosSDK: CosmosSDKService) { this.validators$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.staking.validators(sdk.rest)), + mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), map((result) => result.data), ); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts b/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts index e4ae2464a..354470fae 100644 --- a/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts +++ b/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts @@ -1,7 +1,7 @@ import { CosmosSDKService } from '../../../../models'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20014Validators, QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod, @@ -33,7 +33,7 @@ export class ValidatorComponent implements OnInit { ); this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.staking.validators(sdk.rest)), + mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), map((result) => result.data), ); @@ -80,5 +80,5 @@ export class ValidatorComponent implements OnInit { ); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/portal/src/app/pages/delegate/validators/validators.component.ts b/projects/portal/src/app/pages/delegate/validators/validators.component.ts index 3bf60d078..54bc5e1f1 100644 --- a/projects/portal/src/app/pages/delegate/validators/validators.component.ts +++ b/projects/portal/src/app/pages/delegate/validators/validators.component.ts @@ -7,7 +7,7 @@ import { validatorWithShareType, } from '../../../views/delegate/validators/validators.component'; import { Component, OnInit } from '@angular/core'; -import { cosmosclient, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038DelegationResponses, InlineResponse20041Validators, @@ -41,7 +41,7 @@ export class ValidatorsComponent implements OnInit { private readonly stakingAppService: StakingApplicationService, ) { this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.staking.validators(sdk.rest)), + mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), map((result) => result.data.validators), ); @@ -105,7 +105,7 @@ export class ValidatorsComponent implements OnInit { const combined$ = combineLatest([this.cosmosSDK.sdk$, address$]); this.delegations$ = combined$.pipe( - mergeMap(([sdk, address]) => rest.staking.delegatorDelegations(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorDelegations(sdk.rest, address)), map((result) => result.data.delegation_responses), ); @@ -146,7 +146,7 @@ export class ValidatorsComponent implements OnInit { const unbondingDelegationList = Promise.all( valAddressList.map((valAddress) => { if (!valAddress) return undefined; - return rest.staking + return cosmosclient.rest.staking .unbondingDelegation(sdk.rest, valAddress, accAddress) .then((res) => res && res.data) .catch((err) => { @@ -164,7 +164,7 @@ export class ValidatorsComponent implements OnInit { ); } - ngOnInit() {} + ngOnInit() { } onToggleChange(value: boolean) { this.activeEnabled.next(value); diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts index 59d14adb1..de0aeebd1 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20014Validators, InlineResponse20041Validators, @@ -23,9 +23,9 @@ import { filter, map, mergeMap } from 'rxjs/operators'; }) export class DelegateFormDialogComponent implements OnInit { currentStoredWallet$: Observable; - coins$: Observable; + coins$: Observable; uguuBalance$: Observable | undefined; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; validatorsList$: Observable; validator: InlineResponse20041Validators | undefined; @@ -42,7 +42,7 @@ export class DelegateFormDialogComponent implements OnInit { ) { this.validator = data; this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.staking.validators(sdk.rest)), + mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), map((result) => result.data.validators), ); this.currentStoredWallet$ = this.walletService.currentStoredWallet$; @@ -52,7 +52,7 @@ export class DelegateFormDialogComponent implements OnInit { ); this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => rest.bank.allBalances(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), map((result) => result.data.balances), ); this.uguuBalance$ = this.coins$.pipe( @@ -65,7 +65,7 @@ export class DelegateFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmit($event: DelegateOnSubmitEvent) { const validatorStatus = $event.validatorList.find( diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts index a7885f7d4..1dc65f20b 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts @@ -2,7 +2,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038, InlineResponse20041Validators, @@ -28,7 +28,7 @@ export class DelegateMenuDialogComponent implements OnInit { currentStoredWallet$: Observable; delegations$: Observable; delegation$: Observable; - delegateAmount$: Observable; + delegateAmount$: Observable; isDelegated$: Observable | undefined; totalRewards$: Observable< CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse | undefined @@ -57,7 +57,7 @@ export class DelegateMenuDialogComponent implements OnInit { map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); this.delegations$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => rest.staking.delegatorDelegations(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorDelegations(sdk.rest, address)), map((res) => res.data), ); this.delegateAmount$ = this.delegations$.pipe( @@ -115,7 +115,7 @@ export class DelegateMenuDialogComponent implements OnInit { if (accAddress === undefined) { return of(undefined); } - return rest.distribution + return cosmosclient.rest.distribution .delegationTotalRewards(sdk.rest, accAddress) .then((res) => res.data); }), @@ -125,7 +125,7 @@ export class DelegateMenuDialogComponent implements OnInit { if (accAddress === undefined || valAddress === undefined) { return of(undefined); } - return rest.distribution.validatorCommission(sdk.rest, valAddress).then((res) => res.data); + return cosmosclient.rest.distribution.validatorCommission(sdk.rest, valAddress).then((res) => res.data); }), ); this.isValidator$ = valAddress$.pipe( @@ -138,7 +138,7 @@ export class DelegateMenuDialogComponent implements OnInit { ); } - ngOnInit() {} + ngOnInit() { } onSubmitDelegate(validator: InlineResponse20041Validators) { this.matDialogRef.close(); diff --git a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index 75b2326c9..880b9a347 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -1,7 +1,7 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038, InlineResponse20041Validators, @@ -25,10 +25,10 @@ export class RedelegateFormDialogComponent implements OnInit { validatorsList$: Observable; currentStoredWallet$: Observable; delegations$: Observable; - delegateAmount$: Observable; - coins$: Observable; + delegateAmount$: Observable; + coins$: Observable; uguuBalance$: Observable | undefined; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; validator: InlineResponse20041Validators | undefined; constructor( @@ -44,7 +44,7 @@ export class RedelegateFormDialogComponent implements OnInit { ) { this.validator = data; this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.staking.validators(sdk.rest)), + mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), map((result) => result.data.validators), ); this.currentStoredWallet$ = this.walletService.currentStoredWallet$; @@ -54,7 +54,7 @@ export class RedelegateFormDialogComponent implements OnInit { ); this.delegations$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => rest.staking.delegatorDelegations(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorDelegations(sdk.rest, address)), map((res) => res.data), ); this.delegateAmount$ = this.delegations$.pipe( @@ -68,7 +68,7 @@ export class RedelegateFormDialogComponent implements OnInit { ); this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => rest.bank.allBalances(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), map((result) => result.data.balances), ); this.uguuBalance$ = this.coins$.pipe( @@ -81,7 +81,7 @@ export class RedelegateFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmit($event: RedelegateOnSubmitEvent) { const validatorStatus = $event.validatorList.find( diff --git a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts index eb9d2a809..2c8adba5a 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038, InlineResponse20047, @@ -23,10 +23,10 @@ import { filter, map, mergeMap } from 'rxjs/operators'; export class UndelegateFormDialogComponent implements OnInit { currentStoredWallet$: Observable; delegations$: Observable; - delegateAmount$: Observable; - coins$: Observable; + delegateAmount$: Observable; + coins$: Observable; uguuBalance$: Observable | undefined; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; validator: InlineResponse20041Validators | undefined; unbondingDelegation$: Observable; @@ -46,7 +46,7 @@ export class UndelegateFormDialogComponent implements OnInit { map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); this.delegations$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => rest.staking.delegatorDelegations(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorDelegations(sdk.rest, address)), map((res) => res.data), ); this.unbondingDelegation$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( @@ -56,7 +56,7 @@ export class UndelegateFormDialogComponent implements OnInit { return of(undefined); } const valAddress = cosmosclient.ValAddress.fromString(valAddressString); - const unbondingDelegation = rest.staking + const unbondingDelegation = cosmosclient.rest.staking .unbondingDelegation(sdk.rest, valAddress, address) .then((res) => res.data) .catch((error) => { @@ -77,7 +77,7 @@ export class UndelegateFormDialogComponent implements OnInit { ); this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => rest.bank.allBalances(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), map((result) => result.data.balances), ); this.uguuBalance$ = this.coins$.pipe( @@ -90,7 +90,7 @@ export class UndelegateFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmit($event: UndelegateOnSubmitEvent) { const txHash = await this.stakingAppService.undelegate( diff --git a/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts index 816214693..f94a2a6f3 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; @@ -18,7 +18,7 @@ import { map } from 'rxjs/operators'; }) export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { currentStoredWallet$: Observable; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; validator: InlineResponse20041Validators | undefined; constructor( @@ -35,7 +35,7 @@ export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmit($event: WithdrawDelegatorRewardOnSubmitEvent) { const txHash = await this.distributionAppService.withdrawDelegatorReward( diff --git a/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts index cf177c2f9..599cfd314 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; @@ -18,7 +18,7 @@ import { map } from 'rxjs/operators'; }) export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { currentStoredWallet$: Observable; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; validator: InlineResponse20041Validators | undefined; constructor( @@ -35,7 +35,7 @@ export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmit($event: WithdrawValidatorCommissionOnSubmitEvent) { const txHash = await this.distributionAppService.withdrawValidatorCommission( diff --git a/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts index b3a56e96b..7cd17d14b 100644 --- a/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027Proposals } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; @@ -19,9 +19,9 @@ import { catchError, filter, map, mergeMap } from 'rxjs/operators'; export class DepositFormDialogComponent implements OnInit { proposal$: Observable; currentStoredWallet$: Observable; - coins$: Observable; + coins$: Observable; uguuBalance$: Observable | undefined; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; proposalID: number | undefined; constructor( @@ -35,7 +35,7 @@ export class DepositFormDialogComponent implements OnInit { ) { this.proposalID = data; this.proposal$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.gov.proposal(sdk.rest, String(this.proposalID))), + mergeMap((sdk) => cosmosclient.rest.gov.proposal(sdk.rest, String(this.proposalID))), map((result) => result.data.proposal!), catchError((error) => { console.error(error); @@ -49,7 +49,7 @@ export class DepositFormDialogComponent implements OnInit { ); this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => rest.bank.allBalances(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), map((result) => result.data.balances), ); this.uguuBalance$ = this.coins$.pipe( @@ -62,7 +62,7 @@ export class DepositFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmit($event: DepositOnSubmitEvent) { if (!this.proposalID) { diff --git a/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts index a71e090e2..0d19c7f6c 100644 --- a/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027Proposals } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; @@ -19,9 +19,9 @@ import { catchError, filter, map, mergeMap } from 'rxjs/operators'; export class VoteFormDialogComponent implements OnInit { proposal$: Observable; currentStoredWallet$: Observable; - coins$: Observable; + coins$: Observable; uguuBalance$: Observable | undefined; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; proposalID: number | undefined; constructor( @@ -35,7 +35,7 @@ export class VoteFormDialogComponent implements OnInit { ) { this.proposalID = data; this.proposal$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.gov.proposal(sdk.rest, String(this.proposalID))), + mergeMap((sdk) => cosmosclient.rest.gov.proposal(sdk.rest, String(this.proposalID))), map((result) => result.data.proposal!), catchError((error) => { console.error(error); @@ -49,7 +49,7 @@ export class VoteFormDialogComponent implements OnInit { ); this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => rest.bank.allBalances(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), map((result) => result.data.balances), ); this.uguuBalance$ = this.coins$.pipe( @@ -62,7 +62,7 @@ export class VoteFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmitYes($event: VoteOnSubmitEvent) { if (!this.proposalID) { @@ -70,7 +70,7 @@ export class VoteFormDialogComponent implements OnInit { } const txHash = await this.govAppService.Vote( this.proposalID, - proto.cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_YES, + cosmosclient.proto.cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_YES, $event.minimumGasPrice, $event.gasRatio, ); @@ -82,7 +82,7 @@ export class VoteFormDialogComponent implements OnInit { } const txHash = await this.govAppService.Vote( this.proposalID, - proto.cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_NO_WITH_VETO, + cosmosclient.proto.cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_NO_WITH_VETO, $event.minimumGasPrice, $event.gasRatio, ); @@ -94,7 +94,7 @@ export class VoteFormDialogComponent implements OnInit { } const txHash = await this.govAppService.Vote( this.proposalID, - proto.cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_NO, + cosmosclient.proto.cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_NO, $event.minimumGasPrice, $event.gasRatio, ); @@ -106,7 +106,7 @@ export class VoteFormDialogComponent implements OnInit { } const txHash = await this.govAppService.Vote( this.proposalID, - proto.cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_ABSTAIN, + cosmosclient.proto.cosmos.gov.v1beta1.VoteOption.VOTE_OPTION_ABSTAIN, $event.minimumGasPrice, $event.gasRatio, ); diff --git a/projects/portal/src/app/pages/home/accounts/accounts.component.ts b/projects/portal/src/app/pages/home/accounts/accounts.component.ts index 1fff37e80..4e1a6bb0a 100644 --- a/projects/portal/src/app/pages/home/accounts/accounts.component.ts +++ b/projects/portal/src/app/pages/home/accounts/accounts.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; import { Key } from '../../../models/keys/key.model'; import { KeyService } from '../../../models/keys/key.service'; import { Component, OnInit } from '@angular/core'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, from, Observable, of } from 'rxjs'; import { filter, map, mergeMap } from 'rxjs/operators'; @@ -14,9 +14,9 @@ import { filter, map, mergeMap } from 'rxjs/operators'; export class AccountsComponent implements OnInit { keys$: Observable; accAddresses$: Observable; - balances0$: Observable; - balances1$: Observable; - balances2$: Observable; + balances0$: Observable; + balances1$: Observable; + balances2$: Observable; constructor(private readonly key: KeyService, private cosmosSDK: CosmosSDKService) { this.keys$ = from(this.key.list()); @@ -36,7 +36,7 @@ export class AccountsComponent implements OnInit { if (addresses[0] === undefined) { return []; } - return rest.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, addresses[0]) .then((res) => res.data.balances || []) .catch((_) => []); @@ -51,7 +51,7 @@ export class AccountsComponent implements OnInit { if (addresses[1] === undefined) { return []; } - return rest.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, addresses[1]) .then((res) => res.data.balances || []) .catch((_) => []); @@ -66,7 +66,7 @@ export class AccountsComponent implements OnInit { if (addresses[2] === undefined) { return []; } - return rest.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, addresses[2]) .then((res) => res.data.balances || []) .catch((_) => []); @@ -74,5 +74,5 @@ export class AccountsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/home/bank/bank.component.ts b/projects/portal/src/app/pages/home/bank/bank.component.ts index ac37f51e9..6da407380 100644 --- a/projects/portal/src/app/pages/home/bank/bank.component.ts +++ b/projects/portal/src/app/pages/home/bank/bank.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { QueryTotalSupplyResponseIsTheResponseTypeForTheQueryTotalSupplyRPCMethod } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { combineLatest, Observable, timer } from 'rxjs'; @@ -21,9 +21,9 @@ export class BankComponent implements OnInit { const timer$ = timer(0, 60 * 60 * 1000); const combined$ = combineLatest([timer$, this.cosmosSDK.sdk$]).pipe(map(([_, sdk]) => sdk)); this.totalSupply$ = combined$.pipe( - mergeMap((sdk) => rest.bank.totalSupply(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.bank.totalSupply(sdk.rest).then((res) => res.data)), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/home/blocks/blocks.component.ts b/projects/portal/src/app/pages/home/blocks/blocks.component.ts index 7feda881e..95c09c645 100644 --- a/projects/portal/src/app/pages/home/blocks/blocks.component.ts +++ b/projects/portal/src/app/pages/home/blocks/blocks.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20011, InlineResponse20010 } from '@cosmos-client/core/esm/openapi'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { Observable, of, zip, timer } from 'rxjs'; @@ -23,7 +23,7 @@ export class BlocksComponent implements OnInit { // eslint-disable-next-line no-unused-vars const sdk$ = timer$.pipe(mergeMap((_) => this.cosmosSDK.sdk$)); this.latestBlock$ = sdk$.pipe( - mergeMap((sdk) => rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), ); this.latestBlockHeight$ = this.latestBlock$.pipe( // eslint-disable-next-line no-undef @@ -51,7 +51,7 @@ export class BlocksComponent implements OnInit { ...blockHeights.map((blockHeight) => this.cosmosSDK.sdk$.pipe( mergeMap((sdk) => - rest.tendermint.getBlockByHeight(sdk.rest, blockHeight).then((res) => res.data), + cosmosclient.rest.tendermint.getBlockByHeight(sdk.rest, blockHeight).then((res) => res.data), ), ), ), @@ -65,5 +65,5 @@ export class BlocksComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/home/distribution/distribution.component.ts b/projects/portal/src/app/pages/home/distribution/distribution.component.ts index ece9b389b..588ebd9d2 100644 --- a/projects/portal/src/app/pages/home/distribution/distribution.component.ts +++ b/projects/portal/src/app/pages/home/distribution/distribution.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosDistributionV1beta1QueryCommunityPoolResponse } from '@cosmos-client/core/esm/openapi/api'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { Observable } from 'rxjs'; @@ -19,9 +19,9 @@ export class DistributionComponent implements OnInit { private readonly cosmosSDK: CosmosSDKService, ) { this.communityPool$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.distribution.communityPool(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.distribution.communityPool(sdk.rest).then((res) => res.data)), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/home/home.component.ts b/projects/portal/src/app/pages/home/home.component.ts index 9803819c4..34fe1ac60 100644 --- a/projects/portal/src/app/pages/home/home.component.ts +++ b/projects/portal/src/app/pages/home/home.component.ts @@ -1,6 +1,6 @@ import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { Component, OnDestroy, OnInit } from '@angular/core'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable, timer } from 'rxjs'; import { mergeMap, map } from 'rxjs/operators'; @@ -19,17 +19,17 @@ export class HomeComponent implements OnInit, OnDestroy { const combined$ = combineLatest([timer$, this.cosmosSDK.sdk$]).pipe(map(([_, sdk]) => sdk)); this.nodeInfo$ = combined$.pipe( - mergeMap((sdk) => rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), ); this.syncing$ = combined$.pipe( mergeMap((sdk) => - rest.tendermint.getSyncing(sdk.rest).then((res) => res.data.syncing || false), + cosmosclient.rest.tendermint.getSyncing(sdk.rest).then((res) => res.data.syncing || false), ), ); } - ngOnInit() {} + ngOnInit() { } - ngOnDestroy() {} + ngOnDestroy() { } } diff --git a/projects/portal/src/app/pages/home/mint/mint.component.ts b/projects/portal/src/app/pages/home/mint/mint.component.ts index d75dde992..2f098fd98 100644 --- a/projects/portal/src/app/pages/home/mint/mint.component.ts +++ b/projects/portal/src/app/pages/home/mint/mint.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosMintV1beta1QueryAnnualProvisionsResponse, CosmosMintV1beta1QueryInflationResponse, @@ -23,12 +23,12 @@ export class MintComponent implements OnInit { private readonly cosmosSDK: CosmosSDKService, ) { this.inflation$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.mint.inflation(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.mint.inflation(sdk.rest).then((res) => res.data)), ); this.annualProvisions$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.mint.annualProvisions(sdk.rest).then((res) => res.data)), + mergeMap((sdk) => cosmosclient.rest.mint.annualProvisions(sdk.rest).then((res) => res.data)), ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/home/txs/txs.component.ts b/projects/portal/src/app/pages/home/txs/txs.component.ts index 00ade68bf..9db122085 100644 --- a/projects/portal/src/app/pages/home/txs/txs.component.ts +++ b/projects/portal/src/app/pages/home/txs/txs.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; @@ -40,7 +40,7 @@ export class TxsComponent implements OnInit { this.selectedTxType$, ]).pipe( switchMap(([sdk, _pageNumber, _pageSize, selectedTxType]) => { - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.module='${selectedTxType}'`], @@ -89,7 +89,7 @@ export class TxsComponent implements OnInit { return []; } - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.module='${selectedTxType}'`], @@ -110,7 +110,7 @@ export class TxsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } appSelectedTxTypeChanged(selectedTxType: string): void { this.selectedTxType$.next(selectedTxType); diff --git a/projects/portal/src/app/pages/keys/key/key.component.ts b/projects/portal/src/app/pages/keys/key/key.component.ts index 2bd005202..0cdd0467d 100644 --- a/projects/portal/src/app/pages/keys/key/key.component.ts +++ b/projects/portal/src/app/pages/keys/key/key.component.ts @@ -4,7 +4,7 @@ import { Key } from '../../../models/keys/key.model'; import { KeyService } from '../../../models/keys/key.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable, of } from 'rxjs'; import { filter, map, mergeMap } from 'rxjs/operators'; @@ -19,15 +19,15 @@ export class KeyComponent implements OnInit { key$: Observable; accAddress$: Observable; valAddress$: Observable; - balances$: Observable; + balances$: Observable; faucets$: Observable< | { - hasFaucet: boolean; - faucetURL: string; - denom: string; - creditAmount: number; - maxCredit: number; - }[] + hasFaucet: boolean; + faucetURL: string; + denom: string; + creditAmount: number; + maxCredit: number; + }[] | undefined >; @@ -53,7 +53,7 @@ export class KeyComponent implements OnInit { if (address === undefined) { return []; } - return rest.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, address) .then((res) => res.data.balances || []) .catch((_) => []); @@ -82,5 +82,5 @@ export class KeyComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts index fed15977d..6cf6a9f0d 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts @@ -2,7 +2,7 @@ import { getWithdrawLimit, getIssueLimit } from '../../../../utils/function'; import { getSpotPriceStream, getLiquidationPriceStream } from '../../../../utils/stream'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosSDKService } from 'projects/portal/src/app/models/index'; import { combineLatest, Observable, zip } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -91,5 +91,5 @@ export class CdpComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts index b837c5d12..6e165332f 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, proto, rest as restCosmos } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { CosmosSDKService } from 'projects/portal/src/app/models/index'; import { CdpApplicationService } from 'projects/portal/src/app/models/index'; @@ -23,13 +23,13 @@ export class ClearComponent implements OnInit { collateralType$: Observable; params$: Observable; repaymentDenomString$: Observable; - repaymentDenom$: Observable; + repaymentDenom$: Observable; cdp$: Observable; address$: Observable; - balances$: Observable; - minimumGasPrices$: Observable; + balances$: Observable; + minimumGasPrices$: Observable; pollingInterval = 30; constructor( @@ -61,7 +61,7 @@ export class ClearComponent implements OnInit { if (address === undefined) { return of([]); } - return restCosmos.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, address) .then((res) => res.data.balances || []); }), diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts index b4dc37955..f0b91e0d4 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, proto, rest as restCosmos } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { CosmosSDKService } from 'projects/portal/src/app/models/index'; import { CdpApplicationService } from 'projects/portal/src/app/models/index'; @@ -21,10 +21,10 @@ export class DepositComponent implements OnInit { owner$: Observable; collateralType$: Observable; params$: Observable; - denom$: Observable; + denom$: Observable; address$: Observable; - balances$: Observable; - minimumGasPrices$: Observable; + balances$: Observable; + minimumGasPrices$: Observable; pollingInterval = 30; constructor( @@ -60,7 +60,7 @@ export class DepositComponent implements OnInit { if (address === undefined) { return of([]); } - return restCosmos.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, address) .then((res) => res.data.balances || []); }), @@ -86,7 +86,7 @@ export class DepositComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit($event: DepositCdpOnSubmitEvent) { this.cdpApplicationService.depositCDP( diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts index c60fb2435..4276a5758 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts @@ -2,7 +2,7 @@ import { getIssueLimit } from '../../../../../utils/function'; import { getLiquidationPriceStream } from '../../../../../utils/stream'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, proto, rest as restCosmos } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { CosmosSDKService } from 'projects/portal/src/app/models/index'; import { CdpApplicationService } from 'projects/portal/src/app/models/index'; @@ -25,14 +25,14 @@ export class IssueComponent implements OnInit { collateralType$: Observable; params$: Observable; principalDenom$: Observable; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; cdp$: Observable; liquidationPrice$: Observable; issueLimit$: Observable; address$: Observable; - balances$: Observable; + balances$: Observable; pollingInterval = 30; constructor( @@ -68,7 +68,7 @@ export class IssueComponent implements OnInit { if (address === undefined) { return of([]); } - return restCosmos.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, address) .then((res) => res.data.balances || []); }), @@ -103,7 +103,7 @@ export class IssueComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit($event: IssueCdpOnSubmitEvent) { this.cdpApplicationService.drawCDP( diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts index fcc06a9b6..b3808dd9e 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts @@ -2,7 +2,7 @@ import { getWithdrawLimit } from '../../../../../utils/function'; import { getSpotPriceStream } from '../../../../../utils/stream'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, proto, rest as restCosmos } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { CosmosSDKService } from 'projects/portal/src/app/models/index'; import { CdpApplicationService } from 'projects/portal/src/app/models/index'; @@ -31,8 +31,8 @@ export class WithdrawComponent implements OnInit { withdrawLimit$: Observable; address$: Observable; - balances$: Observable; - minimumGasPrices$: Observable; + balances$: Observable; + minimumGasPrices$: Observable; pollingInterval = 30; constructor( @@ -76,7 +76,7 @@ export class WithdrawComponent implements OnInit { if (address === undefined) { return of([]); } - return restCosmos.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, address) .then((res) => res.data.balances || []); }), @@ -104,7 +104,7 @@ export class WithdrawComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit($event: WithdrawCdpOnSubmitEvent) { this.cdpApplicationService.withdrawCDP( diff --git a/projects/portal/src/app/pages/mint/cdps/cdps.component.ts b/projects/portal/src/app/pages/mint/cdps/cdps.component.ts index 0c2361648..69cd9d250 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdps.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdps.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService, KeyService } from '../../../models/index'; import { Key } from '../../../models/keys/key.model'; import { KeyStoreService } from '../../../models/keys/key.store.service'; import { Component, OnInit } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable, of } from 'rxjs'; import { catchError, filter, map, mergeMap } from 'rxjs/operators'; import { rest } from 'ununifi-client'; @@ -48,5 +48,5 @@ export class CdpsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/pages/mint/cdps/create/create.component.ts b/projects/portal/src/app/pages/mint/cdps/create/create.component.ts index d3df23545..0ec7a4e91 100644 --- a/projects/portal/src/app/pages/mint/cdps/create/create.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/create/create.component.ts @@ -5,7 +5,7 @@ import { getCreateLimit } from '../../../../utils/function'; import { getLiquidationPriceStream } from '../../../../utils/stream'; import { CreateCdpOnSubmitEvent } from '../../../../views/mint/cdps/create/create.component'; import { Component, OnInit } from '@angular/core'; -import { cosmosclient, proto, rest as restCosmos } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.service'; import { timer, of, combineLatest, BehaviorSubject, Observable, Subject } from 'rxjs'; @@ -25,10 +25,10 @@ export class CreateComponent implements OnInit { selectedCollateralTypeSubject: Subject; selectedCollateralType$: Observable; selectedCollateralParam$: Observable; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; address$: Observable; - balances$: Observable; + balances$: Observable; pollingInterval = 30; collateralType$: Observable; @@ -94,7 +94,7 @@ export class CreateComponent implements OnInit { if (address === undefined) { return of([]); } - return restCosmos.bank + return cosmosclient.rest.bank .allBalances(sdk.rest, address) .then((res) => res.data.balances || []); }), @@ -147,7 +147,7 @@ export class CreateComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit($event: CreateCdpOnSubmitEvent) { this.cdpApplicationService.createCDP( diff --git a/projects/portal/src/app/pages/slashing/unjail-simple/unjail-simple.component.ts b/projects/portal/src/app/pages/slashing/unjail-simple/unjail-simple.component.ts index 01c2c9bcf..a16b0f4e2 100644 --- a/projects/portal/src/app/pages/slashing/unjail-simple/unjail-simple.component.ts +++ b/projects/portal/src/app/pages/slashing/unjail-simple/unjail-simple.component.ts @@ -5,7 +5,7 @@ import { StoredWallet } from '../../../models/wallets/wallet.model'; import { WalletService } from '../../../models/wallets/wallet.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { combineLatest, Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -19,7 +19,7 @@ export class UnjailSimpleComponent implements OnInit { currentStoredWallet$: Observable; delegator_address$: Observable; validator_address$: Observable; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; constructor( private readonly route: ActivatedRoute, @@ -54,11 +54,11 @@ export class UnjailSimpleComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async appSubmitUnjail($event: { validator_address: string; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; privateKey: string; }): Promise { console.log('appSubmitUnjail'); diff --git a/projects/portal/src/app/pages/slashing/unjail/unjail.component.ts b/projects/portal/src/app/pages/slashing/unjail/unjail.component.ts index a951636ab..97d4f437c 100644 --- a/projects/portal/src/app/pages/slashing/unjail/unjail.component.ts +++ b/projects/portal/src/app/pages/slashing/unjail/unjail.component.ts @@ -4,7 +4,7 @@ import { WalletService } from '../../../models/wallets/wallet.service'; import { createCosmosPublicKeyFromString } from '../../../utils/key'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { combineLatest, Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -18,7 +18,7 @@ export class UnjailComponent implements OnInit { currentStoredWallet$: Observable; delegator_address$: Observable; validator_address$: Observable; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; constructor( private readonly route: ActivatedRoute, @@ -99,11 +99,11 @@ export class UnjailComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async appSubmitUnjail(unjailData: { validator_address: string; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; }): Promise { const gasRatio = 1.1; await this.slashingApplicationService.unjail( diff --git a/projects/portal/src/app/pages/staking/create-validator-multiple/create-validator-multiple.component.ts b/projects/portal/src/app/pages/staking/create-validator-multiple/create-validator-multiple.component.ts index 5a7b83eb0..a04448f10 100644 --- a/projects/portal/src/app/pages/staking/create-validator-multiple/create-validator-multiple.component.ts +++ b/projects/portal/src/app/pages/staking/create-validator-multiple/create-validator-multiple.component.ts @@ -6,7 +6,7 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { GraphQLErrors, NetworkError } from '@apollo/client/errors'; import { ErrorLink } from '@apollo/client/link/error'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { Apollo, gql } from 'apollo-angular'; import { GraphQLError } from 'graphql'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; @@ -14,7 +14,7 @@ import { Observable, of } from 'rxjs'; import { catchError, filter, map, tap } from 'rxjs/operators'; export type InterfaceCreateValidatorsDataItem = CreateValidatorData & { - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; privateKey: string; }; @@ -41,7 +41,7 @@ export class CreateValidatorMultipleComponent implements OnInit { success: boolean = false; loading: boolean = true; error: string = ''; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; redirectUrls: string[] = []; constructor( private readonly route: ActivatedRoute, diff --git a/projects/portal/src/app/pages/staking/create-validator-simple/create-validator-simple.component.ts b/projects/portal/src/app/pages/staking/create-validator-simple/create-validator-simple.component.ts index 3dc619b46..42f86ee5d 100644 --- a/projects/portal/src/app/pages/staking/create-validator-simple/create-validator-simple.component.ts +++ b/projects/portal/src/app/pages/staking/create-validator-simple/create-validator-simple.component.ts @@ -4,7 +4,7 @@ import { StoredWallet } from '../../../models/wallets/wallet.model'; import { WalletService } from '../../../models/wallets/wallet.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { combineLatest, Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -32,7 +32,7 @@ export class CreateValidatorSimpleComponent implements OnInit { ip$: Observable; node_id$: Observable; pubkey$: Observable; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; constructor( private readonly route: ActivatedRoute, @@ -124,11 +124,11 @@ export class CreateValidatorSimpleComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async appSubmitCreateValidator( createValidatorData: CreateValidatorData & { - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; privateKey: string; }, ): Promise { diff --git a/projects/portal/src/app/pages/staking/create-validator/create-validator.component.ts b/projects/portal/src/app/pages/staking/create-validator/create-validator.component.ts index 88d54a76b..4c66f02cf 100644 --- a/projects/portal/src/app/pages/staking/create-validator/create-validator.component.ts +++ b/projects/portal/src/app/pages/staking/create-validator/create-validator.component.ts @@ -5,7 +5,7 @@ import { WalletService } from '../../../models/wallets/wallet.service'; import { createCosmosPublicKeyFromString } from '../../../utils/key'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { combineLatest, Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -33,7 +33,7 @@ export class CreateValidatorComponent implements OnInit { ip$: Observable; node_id$: Observable; pubkey$: Observable; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; constructor( private readonly route: ActivatedRoute, @@ -171,11 +171,11 @@ export class CreateValidatorComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async appSubmitCreateValidator( createValidatorData: CreateValidatorData & { - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; }, ): Promise { await this.stakingApplicationService.createValidator( diff --git a/projects/portal/src/app/pages/txs/tx/tx.component.ts b/projects/portal/src/app/pages/txs/tx/tx.component.ts index 29a630d71..9642ea02a 100644 --- a/projects/portal/src/app/pages/txs/tx/tx.component.ts +++ b/projects/portal/src/app/pages/txs/tx/tx.component.ts @@ -1,7 +1,7 @@ import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosTxV1beta1GetTxResponse } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -18,9 +18,9 @@ export class TxComponent implements OnInit { constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { this.txHash$ = this.route.params.pipe(map((params) => params.tx_hash)); this.tx$ = combineLatest([this.cosmosSDK.sdk$, this.txHash$]).pipe( - mergeMap(([sdk, hash]) => rest.tx.getTx(sdk.rest, hash).then((res) => res.data)), + mergeMap(([sdk, hash]) => cosmosclient.rest.tx.getTx(sdk.rest, hash).then((res) => res.data)), ); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/portal/src/app/pages/txs/txs.component.ts b/projects/portal/src/app/pages/txs/txs.component.ts index 225ca9289..63ded8ae9 100644 --- a/projects/portal/src/app/pages/txs/txs.component.ts +++ b/projects/portal/src/app/pages/txs/txs.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import { Router, ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; @@ -60,7 +60,7 @@ export class TxsComponent implements OnInit { this.txsTotalCount$ = combineLatest([sdk$, this.selectedTxTypeChanged$]).pipe( switchMap(([sdk, selectedTxType]) => { - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.module='${selectedTxType}'`], @@ -119,8 +119,8 @@ export class TxsComponent implements OnInit { // Note: This is strange. This is temporary workaround way. const temporaryWorkaroundPageSize = txsTotalCount === BigInt(1) && - modifiedPageOffset === BigInt(1) && - modifiedPageSize === BigInt(1) + modifiedPageOffset === BigInt(1) && + modifiedPageSize === BigInt(1) ? modifiedPageSize + BigInt(1) : modifiedPageSize; @@ -128,7 +128,7 @@ export class TxsComponent implements OnInit { return []; } - return rest.tx + return cosmosclient.rest.tx .getTxsEvent( sdk.rest, [`message.module='${selectedTxType}'`], @@ -147,7 +147,7 @@ export class TxsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } appSelectedTxTypeChanged(selectedTxType: string): void { this.router.navigate([], { diff --git a/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts b/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts index 60924241a..2412528a6 100644 --- a/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts +++ b/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027Proposals, InlineResponse20029Deposits, @@ -39,7 +39,7 @@ export class ProposalComponent implements OnInit { const combined$ = combineLatest([this.cosmosSDK.sdk$, proposalID$]); this.proposal$ = combined$.pipe( - mergeMap(([sdk, id]) => rest.gov.proposal(sdk.rest, id)), + mergeMap(([sdk, id]) => cosmosclient.rest.gov.proposal(sdk.rest, id)), map((result) => result.data.proposal!), catchError((error) => { console.error(error); @@ -56,7 +56,7 @@ export class ProposalComponent implements OnInit { ); this.deposits$ = combined$.pipe( - mergeMap(([sdk, proposalID]) => rest.gov.deposits(sdk.rest, proposalID)), + mergeMap(([sdk, proposalID]) => cosmosclient.rest.gov.deposits(sdk.rest, proposalID)), map((result) => result.data.deposits!), catchError((error) => { console.error(error); @@ -65,12 +65,12 @@ export class ProposalComponent implements OnInit { ); this.depositParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.gov.params(sdk.rest, 'deposit')), + mergeMap((sdk) => cosmosclient.rest.gov.params(sdk.rest, 'deposit')), map((result) => result.data.deposit_params), ); this.tally$ = combined$.pipe( - mergeMap(([sdk, proposalID]) => rest.gov.tallyresult(sdk.rest, proposalID)), + mergeMap(([sdk, proposalID]) => cosmosclient.rest.gov.tallyresult(sdk.rest, proposalID)), map((result) => result.data.tally!), catchError((error) => { console.error(error); @@ -79,7 +79,7 @@ export class ProposalComponent implements OnInit { ); this.tallyParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.gov.params(sdk.rest, 'tallying')), + mergeMap((sdk) => cosmosclient.rest.gov.params(sdk.rest, 'tallying')), map((result) => result.data.tally_params), catchError((error) => { console.error(error); @@ -88,7 +88,7 @@ export class ProposalComponent implements OnInit { ); this.votes$ = combined$.pipe( - mergeMap(([sdk, proposalID]) => rest.gov.votes(sdk.rest, proposalID)), + mergeMap(([sdk, proposalID]) => cosmosclient.rest.gov.votes(sdk.rest, proposalID)), map((result) => result.data.votes!), catchError((error) => { console.error(error); @@ -97,7 +97,7 @@ export class ProposalComponent implements OnInit { ); this.votingParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.gov.params(sdk.rest, 'voting')), + mergeMap((sdk) => cosmosclient.rest.gov.params(sdk.rest, 'voting')), map((result) => result.data.voting_params), catchError((error) => { console.error(error); @@ -106,7 +106,7 @@ export class ProposalComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } onVoteProposal(proposalID: number) { this.govAppService.openVoteFormDialog(proposalID); diff --git a/projects/portal/src/app/pages/vote/proposals/proposals.component.ts b/projects/portal/src/app/pages/vote/proposals/proposals.component.ts index 55da8c853..0d008ee97 100644 --- a/projects/portal/src/app/pages/vote/proposals/proposals.component.ts +++ b/projects/portal/src/app/pages/vote/proposals/proposals.component.ts @@ -1,7 +1,7 @@ import { GovApplicationService } from '../../../models/cosmos/gov.application.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027FinalTallyResult, InlineResponse20027Proposals, @@ -25,14 +25,14 @@ export class ProposalsComponent implements OnInit { private readonly govAppService: GovApplicationService, ) { this.proposals$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.gov.proposals(sdk.rest)), + mergeMap((sdk) => cosmosclient.rest.gov.proposals(sdk.rest)), map((result) => result.data.proposals!), ); this.tallies$ = combineLatest([this.cosmosSDK.sdk$, this.proposals$]).pipe( mergeMap(([sdk, proposals]) => Promise.all( proposals.map((proposal) => - rest.gov.tallyresult(sdk.rest, proposal.proposal_id!).catch((err) => { + cosmosclient.rest.gov.tallyresult(sdk.rest, proposal.proposal_id!).catch((err) => { console.log(err); return; }), @@ -43,7 +43,7 @@ export class ProposalsComponent implements OnInit { ); } - ngOnInit(): void {} + ngOnInit(): void { } onVoteProposal(proposalID: number) { this.govAppService.openVoteFormDialog(proposalID); diff --git a/projects/portal/src/app/utils/converter.ts b/projects/portal/src/app/utils/converter.ts index faa7c4982..eb2ca6ab8 100644 --- a/projects/portal/src/app/utils/converter.ts +++ b/projects/portal/src/app/utils/converter.ts @@ -1,4 +1,4 @@ -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export const convertHexStringToUint8Array = (hexString: string): Uint8Array | undefined => { try { @@ -28,28 +28,28 @@ export const convertUint8ArrayToHexString = (uint8Array: Uint8Array): string | u export const convertUnknownAccountToTypedAccount = ( unknownAccount: unknown, ): - | proto.cosmos.auth.v1beta1.BaseAccount - | proto.cosmos.vesting.v1beta1.BaseVestingAccount - | proto.cosmos.vesting.v1beta1.ContinuousVestingAccount - | proto.cosmos.vesting.v1beta1.DelayedVestingAccount - | proto.cosmos.vesting.v1beta1.PeriodicVestingAccount - | proto.cosmos.vesting.v1beta1.PermanentLockedAccount - | proto.cosmos.auth.v1beta1.ModuleAccount + | cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount + | cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount | null | undefined => { - if (unknownAccount instanceof proto.cosmos.auth.v1beta1.BaseAccount) { + if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.BaseVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.auth.v1beta1.ModuleAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount) { return unknownAccount; } else if (unknownAccount === undefined) { return unknownAccount; @@ -64,51 +64,51 @@ export const convertUnknownAccountToTypedAccount = ( export const convertUnknownAccountToBaseAccount = ( unknownAccount: unknown, -): proto.cosmos.auth.v1beta1.BaseAccount | null | undefined => { +): cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount | null | undefined => { if (unknownAccount === undefined) { return unknownAccount; } else if (unknownAccount === null) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.auth.v1beta1.BaseAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.BaseVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount) { if (unknownAccount.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount(unknownAccount.base_account); - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount(unknownAccount.base_account); + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount( + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( unknownAccount.base_vesting_account?.base_account, ); - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount( + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( unknownAccount.base_vesting_account?.base_account, ); - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount( + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( unknownAccount.base_vesting_account?.base_account, ); - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount( + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( unknownAccount.base_vesting_account?.base_account, ); - } else if (unknownAccount instanceof proto.cosmos.auth.v1beta1.ModuleAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount) { if (unknownAccount.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount(unknownAccount.base_account); + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount(unknownAccount.base_account); } else { console.error('Unsupported Account!'); console.error(unknownAccount); @@ -118,29 +118,29 @@ export const convertUnknownAccountToBaseAccount = ( export const convertTypedAccountToTypedName = ( unknownAccount: - | proto.cosmos.auth.v1beta1.BaseAccount - | proto.cosmos.vesting.v1beta1.BaseVestingAccount - | proto.cosmos.vesting.v1beta1.ContinuousVestingAccount - | proto.cosmos.vesting.v1beta1.DelayedVestingAccount - | proto.cosmos.vesting.v1beta1.PeriodicVestingAccount - | proto.cosmos.vesting.v1beta1.PermanentLockedAccount - | proto.cosmos.auth.v1beta1.ModuleAccount + | cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount + | cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount | null | undefined, ): string | null | undefined => { - if (unknownAccount instanceof proto.cosmos.auth.v1beta1.BaseAccount) { + if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { return 'BaseAccount'; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.BaseVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount) { return 'BaseVestingAccount'; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { return 'ContinuousVestingAccount'; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { return 'DelayedVestingAccount'; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { return 'PeriodicVestingAccount'; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { return 'PermanentLockedAccount'; - } else if (unknownAccount instanceof proto.cosmos.auth.v1beta1.ModuleAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount) { return 'ModuleAccount'; } else if (unknownAccount === undefined) { return unknownAccount; diff --git a/projects/portal/src/app/utils/key.ts b/projects/portal/src/app/utils/key.ts index 41fc09ca9..51d005bba 100644 --- a/projects/portal/src/app/utils/key.ts +++ b/projects/portal/src/app/utils/key.ts @@ -1,6 +1,6 @@ import { KeyType } from '../models/keys/key.model'; import { convertHexStringToUint8Array, convertUint8ArrayToHexString } from './converter'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { PrivKey, PubKey } from '@cosmos-client/core/esm/types'; export const createPrivateKeyFromMnemonic = async ( @@ -51,9 +51,9 @@ export const createCosmosPrivateKeyFromUint8Array = ( try { switch (keyType) { case KeyType.secp256k1: - return new proto.cosmos.crypto.secp256k1.PrivKey({ key: privateKeyUint8Array }); + return new cosmosclient.proto.cosmos.crypto.secp256k1.PrivKey({ key: privateKeyUint8Array }); case KeyType.ed25519: - return new proto.cosmos.crypto.ed25519.PrivKey({ key: privateKeyUint8Array }); + return new cosmosclient.proto.cosmos.crypto.ed25519.PrivKey({ key: privateKeyUint8Array }); // Todo: implementation is necessary case KeyType.ethsecp256k1: return undefined; @@ -87,9 +87,9 @@ export const createCosmosPublicKeyFromUint8Array = ( try { switch (keyType) { case KeyType.secp256k1: - return new proto.cosmos.crypto.secp256k1.PubKey({ key: publicKeyUint8Array }); + return new cosmosclient.proto.cosmos.crypto.secp256k1.PubKey({ key: publicKeyUint8Array }); case KeyType.ed25519: - return new proto.cosmos.crypto.ed25519.PubKey({ key: publicKeyUint8Array }); + return new cosmosclient.proto.cosmos.crypto.ed25519.PubKey({ key: publicKeyUint8Array }); // Todo: implementation is necessary case KeyType.ethsecp256k1: return undefined; diff --git a/projects/portal/src/app/utils/stream.ts b/projects/portal/src/app/utils/stream.ts index f1ecf5828..cb48d5b72 100644 --- a/projects/portal/src/app/utils/stream.ts +++ b/projects/portal/src/app/utils/stream.ts @@ -1,4 +1,4 @@ -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { Observable, zip } from 'rxjs'; import { map, mergeMap, filter } from 'rxjs/operators'; import { ununifi, rest } from 'ununifi-client'; diff --git a/projects/portal/src/app/utils/validation.ts b/projects/portal/src/app/utils/validation.ts index 591cd71cd..2cd5486b5 100644 --- a/projects/portal/src/app/utils/validation.ts +++ b/projects/portal/src/app/utils/validation.ts @@ -1,6 +1,6 @@ import { StoredWallet } from '../models/wallets/wallet.model'; import { createCosmosPrivateKeyFromString, createCosmosPublicKeyFromString } from './key'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export const validatePrivateStoredWallet = ( privateStoredWallet: StoredWallet & { privateKey: string }, diff --git a/projects/portal/src/app/views/accounts/account/account.component.ts b/projects/portal/src/app/views/accounts/account/account.component.ts index 6228bd834..1b2452127 100644 --- a/projects/portal/src/app/views/accounts/account/account.component.ts +++ b/projects/portal/src/app/views/accounts/account/account.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, Input, OnChanges } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'view-account', @@ -8,43 +8,43 @@ import { cosmosclient, proto } from '@cosmos-client/core'; }) export class AccountComponent implements OnInit, OnChanges { @Input() - account?: proto.cosmos.auth.v1beta1.BaseAccount | unknown | null; + account?: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount | unknown | null; @Input() - balances?: proto.cosmos.base.v1beta1.ICoin[] | null; + balances?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; - baseAccount?: proto.cosmos.auth.v1beta1.BaseAccount; - vestingAccount?: proto.cosmos.vesting.v1beta1.ContinuousVestingAccount; + baseAccount?: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount; + vestingAccount?: cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount; publicKey?: string; txColumnKeys = ['height', 'txhash', 'timestamp', 'gas_wanted', 'gas_used']; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } ngOnChanges() { delete this.baseAccount; - if (this.account instanceof proto.cosmos.auth.v1beta1.BaseAccount) { + if (this.account instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { this.baseAccount = this.account; // Todo: fix pub_key zero issue and convert bech32 format const publicKey = cosmosclient.codec.protoAnyToInstance(this.baseAccount.pub_key); - if (!(publicKey instanceof proto.cosmos.crypto.secp256k1.PubKey)) { + if (!(publicKey instanceof cosmosclient.proto.cosmos.crypto.secp256k1.PubKey)) { throw Error('Invalid public key!'); } this.publicKey = Buffer.from(publicKey.key).toString('hex'); - } else if (this.account instanceof proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + } else if (this.account instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { this.vestingAccount = this.account; if (this.vestingAccount.base_vesting_account?.base_account === null) { throw Error('Invalid vesting account!'); } - this.baseAccount = new proto.cosmos.auth.v1beta1.BaseAccount( + this.baseAccount = new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( this.vestingAccount.base_vesting_account?.base_account, ); // Todo: fix pub_key zero issue and convert bech32 format const publicKey = cosmosclient.codec.protoAnyToInstance(this.baseAccount.pub_key); - if (!(publicKey instanceof proto.cosmos.crypto.secp256k1.PubKey)) { + if (!(publicKey instanceof cosmosclient.proto.cosmos.crypto.secp256k1.PubKey)) { throw Error('Invalid public key!'); } this.publicKey = Buffer.from(publicKey.key).toString('hex'); diff --git a/projects/portal/src/app/views/auction/auctions/auction/place-bid/place-bid.component.ts b/projects/portal/src/app/views/auction/auctions/auction/place-bid/place-bid.component.ts index 6d9b66d0d..92f666a71 100644 --- a/projects/portal/src/app/views/auction/auctions/auction/place-bid/place-bid.component.ts +++ b/projects/portal/src/app/views/auction/auctions/auction/place-bid/place-bid.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; import { ununifi } from 'ununifi-client'; @@ -7,8 +7,8 @@ export type PlaceBidOnSubmitEvent = { key: Key; privateKey: Uint8Array; auctionID: string; - amount: proto.cosmos.base.v1beta1.ICoin; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; }; @Component({ @@ -33,12 +33,12 @@ export class BidComponent implements OnInit { maxEndTime?: Date | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() appSubmit: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; constructor() { this.appSubmit = new EventEmitter(); @@ -50,7 +50,7 @@ export class BidComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit(privateKeyString: string, Denom: string, Amount: string, minimumGasPrice: string) { if (!this.auctionID) { diff --git a/projects/portal/src/app/views/balance/balance.component.ts b/projects/portal/src/app/views/balance/balance.component.ts index 5236cd1b0..3fdaae7a7 100644 --- a/projects/portal/src/app/views/balance/balance.component.ts +++ b/projects/portal/src/app/views/balance/balance.component.ts @@ -2,7 +2,7 @@ import { WalletType } from '../../models/wallets/wallet.model'; import { Clipboard } from '@angular/cdk/clipboard'; import { Component, Input, OnInit, OnChanges } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; @Component({ @@ -17,15 +17,15 @@ export class ViewBalanceComponent implements OnInit, OnChanges { @Input() accountTypeName?: string | null; @Input() publicKey?: string | null; @Input() valAddress?: string | null; - @Input() balances?: proto.cosmos.base.v1beta1.ICoin[] | null; + @Input() balances?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() faucets?: | { - hasFaucet: boolean; - faucetURL: string; - denom: string; - creditAmount: number; - maxCredit: number; - }[] + hasFaucet: boolean; + faucetURL: string; + denom: string; + creditAmount: number; + maxCredit: number; + }[] | null; @Input() nodeInfo?: InlineResponse20012 | null; @@ -37,7 +37,7 @@ export class ViewBalanceComponent implements OnInit, OnChanges { this.tempNodeInfo = this.nodeInfo as any; } - ngOnInit(): void {} + ngOnInit(): void { } // Todo: This lifecycle methods is temporal fix. // default_node_info in type definition of InlineResponse20012 is actually node_info. diff --git a/projects/portal/src/app/views/cosmos/bank/send/send.component.ts b/projects/portal/src/app/views/cosmos/bank/send/send.component.ts index 263110afa..89bf0f948 100644 --- a/projects/portal/src/app/views/cosmos/bank/send/send.component.ts +++ b/projects/portal/src/app/views/cosmos/bank/send/send.component.ts @@ -1,13 +1,13 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; export type SendOnSubmitEvent = { currentStoredWallet: StoredWallet; toAddress: string; - amount: proto.cosmos.base.v1beta1.ICoin[]; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - coins: proto.cosmos.base.v1beta1.ICoin[]; + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin[]; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + coins: cosmosclient.proto.cosmos.base.v1beta1.ICoin[]; }; @Component({ @@ -20,18 +20,18 @@ export class SendComponent implements OnInit { currentStoredWallet?: StoredWallet | null; @Input() - coins?: proto.cosmos.base.v1beta1.ICoin[] | null; + coins?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - amount?: proto.cosmos.base.v1beta1.ICoin[] | null; + amount?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() appSubmit: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; constructor() { this.appSubmit = new EventEmitter(); @@ -43,7 +43,7 @@ export class SendComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit(toAddress: string, minimumGasPrice: string) { if (!this.currentStoredWallet) { diff --git a/projects/portal/src/app/views/cosmos/staking/delegators/create/create.component.ts b/projects/portal/src/app/views/cosmos/staking/delegators/create/create.component.ts index d5a7acc05..f88a4009d 100644 --- a/projects/portal/src/app/views/cosmos/staking/delegators/create/create.component.ts +++ b/projects/portal/src/app/views/cosmos/staking/delegators/create/create.component.ts @@ -1,11 +1,11 @@ import { Key } from '../../../../../models/keys/key.model'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export type CreateOnSubmitEvent = { key: Key; validatorAddress: string; - amount: proto.cosmos.base.v1beta1.ICoin; + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin; privateKey: string; }; @@ -19,7 +19,7 @@ export class CreateComponent implements OnInit { key?: Key | null; @Input() - coins?: proto.cosmos.base.v1beta1.ICoin[] | null; + coins?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() bondDenom?: string; @@ -31,7 +31,7 @@ export class CreateComponent implements OnInit { this.appSubmit = new EventEmitter(); } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit(validatorAddress: string, amount: string, privateKey: string) { this.appSubmit.emit({ diff --git a/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts b/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts index ef59d7ae7..1d03ce6f1 100644 --- a/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts +++ b/projects/portal/src/app/views/cosmos/staking/validators/validator/validator.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, Input, OnChanges } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; @Component({ @@ -13,16 +13,16 @@ export class ValidatorComponent implements OnInit, OnChanges { publicKey?: string; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } ngOnChanges() { const pubKey = cosmosclient.codec.protoJSONToInstance( cosmosclient.codec.castProtoJSONOfProtoAny(this.validator?.consensus_pubkey), ); - if (!(pubKey instanceof proto.cosmos.crypto.ed25519.PubKey)) { + if (!(pubKey instanceof cosmosclient.proto.cosmos.crypto.ed25519.PubKey)) { return; } this.publicKey = Buffer.from(pubKey.key).toString('hex'); diff --git a/projects/portal/src/app/views/cosmos/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts b/projects/portal/src/app/views/cosmos/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts index 24a10d091..679b267c4 100644 --- a/projects/portal/src/app/views/cosmos/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts +++ b/projects/portal/src/app/views/cosmos/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'app-view-tx-fee-confirm-dialog', @@ -11,13 +11,13 @@ export class TxFeeConfirmDialogComponent implements OnInit { constructor( @Inject(MAT_DIALOG_DATA) public readonly data: { - fee: proto.cosmos.base.v1beta1.ICoin; + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; isConfirmed: boolean; }, private readonly dialogRef: MatDialogRef, - ) {} + ) { } - ngOnInit(): void {} + ngOnInit(): void { } okToSendTx(): void { this.data.isConfirmed = true; diff --git a/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts b/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts index 74f288b71..c47cd1200 100644 --- a/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts +++ b/projects/portal/src/app/views/delegate/validators/validator/validator.component.ts @@ -1,6 +1,6 @@ import { validatorType } from '../validators.component'; import { Component, OnInit, Input, OnChanges } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @@ -16,9 +16,9 @@ export class ValidatorComponent implements OnInit { @Input() accAddress?: cosmosclient.AccAddress | null; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(validator: InlineResponse20041Validators | undefined | null) { const hash = crypto diff --git a/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts index 592f84250..ea5fc1975 100644 --- a/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts @@ -1,13 +1,13 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet, WalletType } from 'projects/portal/src/app/models/wallets/wallet.model'; export type DelegateOnSubmitEvent = { walletType: WalletType; - amount: proto.cosmos.base.v1beta1.ICoin; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; validatorList: InlineResponse20041Validators[]; gasRatio: number; }; @@ -23,20 +23,20 @@ export class DelegateFormDialogComponent implements OnInit { @Input() validatorsList?: InlineResponse20041Validators[] | null; @Input() - coins?: proto.cosmos.base.v1beta1.ICoin[] | null; + coins?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() uguuBalance?: string | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() validator?: InlineResponse20041Validators | null; @Output() appSubmit: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; availableDenoms?: string[]; - selectedAmount?: proto.cosmos.base.v1beta1.ICoin; + selectedAmount?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; constructor() { @@ -54,7 +54,7 @@ export class DelegateFormDialogComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(address: string) { const hash = crypto diff --git a/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts index 1ecc99482..c769b361c 100644 --- a/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038, InlineResponse20041Validators, @@ -22,7 +22,7 @@ export class DelegateMenuDialogComponent implements OnInit { @Input() delegations?: InlineResponse20038 | null; @Input() - delegateAmount?: proto.cosmos.base.v1beta1.ICoin | null; + delegateAmount?: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null; @Input() isDelegated?: boolean | null; @Input() @@ -53,7 +53,7 @@ export class DelegateMenuDialogComponent implements OnInit { this.appDetail = new EventEmitter(); } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(address: string) { const hash = crypto diff --git a/projects/portal/src/app/views/dialogs/delegate/invalid-validator-confirm-dialog/inactive-validator-confirm-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/invalid-validator-confirm-dialog/inactive-validator-confirm-dialog.component.ts index f5646d908..c25fec8ac 100644 --- a/projects/portal/src/app/views/dialogs/delegate/invalid-validator-confirm-dialog/inactive-validator-confirm-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/invalid-validator-confirm-dialog/inactive-validator-confirm-dialog.component.ts @@ -1,6 +1,5 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { proto } from '@cosmos-client/core'; @Component({ selector: 'app-view-inactive-validator-confirm-dialog', @@ -15,9 +14,9 @@ export class InactiveValidatorConfirmDialogComponent implements OnInit { isConfirmed: boolean; }, private readonly dialogRef: MatDialogRef, - ) {} + ) { } - ngOnInit(): void {} + ngOnInit(): void { } okToSendTx(): void { this.data.isConfirmed = true; diff --git a/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index ac46613d3..3872b3670 100644 --- a/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038, InlineResponse20041Validators, @@ -9,8 +9,8 @@ import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.mode export type RedelegateOnSubmitEvent = { destinationValidator: string; - amount: proto.cosmos.base.v1beta1.ICoin; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; validatorList: InlineResponse20041Validators[]; gasRatio: number; }; @@ -28,22 +28,22 @@ export class RedelegateFormDialogComponent implements OnInit { @Input() delegations?: InlineResponse20038 | null; @Input() - delegateAmount?: proto.cosmos.base.v1beta1.ICoin | null; + delegateAmount?: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null; @Input() - coins?: proto.cosmos.base.v1beta1.ICoin[] | null; + coins?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() uguuBalance?: string | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() validator?: InlineResponse20041Validators | null; @Output() appSubmit: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; availableDenoms?: string[]; - selectedAmount?: proto.cosmos.base.v1beta1.ICoin; + selectedAmount?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; selectedValidator?: InlineResponse20041Validators; gasRatio: number; @@ -63,7 +63,7 @@ export class RedelegateFormDialogComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(address: string) { const hash = crypto diff --git a/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts index 521775fee..f2ad6aafe 100644 --- a/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038, InlineResponse20047, @@ -9,8 +9,8 @@ import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; export type UndelegateOnSubmitEvent = { - amount: proto.cosmos.base.v1beta1.ICoin; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; }; @@ -25,13 +25,13 @@ export class UndelegateFormDialogComponent implements OnInit { @Input() delegations?: InlineResponse20038 | null; @Input() - delegateAmount?: proto.cosmos.base.v1beta1.ICoin | null; + delegateAmount?: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null; @Input() - coins?: proto.cosmos.base.v1beta1.ICoin[] | null; + coins?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() uguuBalance?: string | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() unbondingDelegation?: InlineResponse20047 | null; @Input() @@ -40,9 +40,9 @@ export class UndelegateFormDialogComponent implements OnInit { @Output() appSubmit: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; availableDenoms?: string[]; - selectedAmount?: proto.cosmos.base.v1beta1.ICoin; + selectedAmount?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; estimatedUnbondingData: string = ''; @@ -64,7 +64,7 @@ export class UndelegateFormDialogComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(address: string) { const hash = crypto diff --git a/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts index ceedb28dc..002716a51 100644 --- a/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts @@ -1,11 +1,11 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; export type WithdrawDelegatorRewardOnSubmitEvent = { - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; }; @@ -18,14 +18,14 @@ export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() validator?: InlineResponse20041Validators | null; @Output() appSubmit: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; availableDenoms?: string[]; gasRatio: number; @@ -41,7 +41,7 @@ export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(address: string) { const hash = crypto diff --git a/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts index 0ef154d0b..af8cbbb62 100644 --- a/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038, InlineResponse20041Validators, @@ -8,7 +8,7 @@ import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; export type WithdrawValidatorCommissionOnSubmitEvent = { - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; }; @@ -21,14 +21,14 @@ export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() validator?: InlineResponse20041Validators | null; @Output() appSubmit: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; availableDenoms?: string[]; gasRatio: number; @@ -44,7 +44,7 @@ export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(address: string) { const hash = crypto diff --git a/projects/portal/src/app/views/dialogs/vote/deposit/deposit-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/vote/deposit/deposit-form-dialog.component.ts index f0bef6a93..9f16e7e8f 100644 --- a/projects/portal/src/app/views/dialogs/vote/deposit/deposit-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/vote/deposit/deposit-form-dialog.component.ts @@ -1,13 +1,13 @@ import { ProposalContent } from '../../../vote/proposals/proposals.component'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027Proposals } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; export type DepositOnSubmitEvent = { - amount: proto.cosmos.base.v1beta1.ICoin; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; }; @@ -22,20 +22,20 @@ export class DepositFormDialogComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() - coins?: proto.cosmos.base.v1beta1.ICoin[] | null; + coins?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() uguuBalance?: string | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() proposalID?: number | null; @Output() appSubmit: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; availableDenoms?: string[]; - selectedAmount?: proto.cosmos.base.v1beta1.ICoin; + selectedAmount?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; constructor() { @@ -53,7 +53,7 @@ export class DepositFormDialogComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(address: string) { const hash = crypto diff --git a/projects/portal/src/app/views/dialogs/vote/vote/vote-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/vote/vote/vote-form-dialog.component.ts index 296a20cea..ebdcd240a 100644 --- a/projects/portal/src/app/views/dialogs/vote/vote/vote-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/vote/vote/vote-form-dialog.component.ts @@ -1,12 +1,12 @@ import { ProposalContent } from '../../../vote/proposals/proposals.component'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027Proposals } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; export type VoteOnSubmitEvent = { - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; }; @@ -21,11 +21,11 @@ export class VoteFormDialogComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() - coins?: proto.cosmos.base.v1beta1.ICoin[] | null; + coins?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() uguuBalance?: string | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() proposalID?: number | null; @@ -38,9 +38,9 @@ export class VoteFormDialogComponent implements OnInit { @Output() appSubmitAbstain: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; availableDenoms?: string[]; - selectedAmount?: proto.cosmos.base.v1beta1.ICoin; + selectedAmount?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; constructor() { @@ -61,7 +61,7 @@ export class VoteFormDialogComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(address: string) { const hash = crypto diff --git a/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-create-wallet-form-dialog/ununifi-create-wallet-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-create-wallet-form-dialog/ununifi-create-wallet-form-dialog.component.ts index 6b06748eb..94c0c101b 100644 --- a/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-create-wallet-form-dialog/ununifi-create-wallet-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-create-wallet-form-dialog/ununifi-create-wallet-form-dialog.component.ts @@ -2,7 +2,7 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { Component, OnInit } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import * as bip39 from 'bip39'; import { KeyType } from 'projects/portal/src/app/models/keys/key.model'; import { StoredWallet, WalletType } from 'projects/portal/src/app/models/wallets/wallet.model'; diff --git a/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-mnemonic-form-dialog/ununifi-import-wallet-with-mnemonic-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-mnemonic-form-dialog/ununifi-import-wallet-with-mnemonic-form-dialog.component.ts index fc707ca56..89aace39a 100644 --- a/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-mnemonic-form-dialog/ununifi-import-wallet-with-mnemonic-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-mnemonic-form-dialog/ununifi-import-wallet-with-mnemonic-form-dialog.component.ts @@ -3,7 +3,7 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { Component, OnInit } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { KeyType } from 'projects/portal/src/app/models/keys/key.model'; import { StoredWallet, WalletType } from 'projects/portal/src/app/models/wallets/wallet.model'; import { WalletService } from 'projects/portal/src/app/models/wallets/wallet.service'; diff --git a/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-private-key-form-dialog/ununifi-import-wallet-with-private-key-form-dialog.component.ts b/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-private-key-form-dialog/ununifi-import-wallet-with-private-key-form-dialog.component.ts index 84a39a321..1188ac058 100644 --- a/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-private-key-form-dialog/ununifi-import-wallet-with-private-key-form-dialog.component.ts +++ b/projects/portal/src/app/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-private-key-form-dialog/ununifi-import-wallet-with-private-key-form-dialog.component.ts @@ -2,7 +2,7 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { Component, OnInit } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { KeyType } from 'projects/portal/src/app/models/keys/key.model'; import { StoredWallet, WalletType } from 'projects/portal/src/app/models/wallets/wallet.model'; import { WalletService } from 'projects/portal/src/app/models/wallets/wallet.service'; diff --git a/projects/portal/src/app/views/home/accounts/accounts.component.ts b/projects/portal/src/app/views/home/accounts/accounts.component.ts index 959962b63..c7431e2dd 100644 --- a/projects/portal/src/app/views/home/accounts/accounts.component.ts +++ b/projects/portal/src/app/views/home/accounts/accounts.component.ts @@ -1,6 +1,6 @@ import { Key } from '../../../models/keys/key.model'; import { Component, Input, OnInit } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'view-accounts', @@ -13,13 +13,13 @@ export class AccountsComponent implements OnInit { @Input() accAddresses?: cosmosclient.AccAddress[] | null; @Input() - balances0?: proto.cosmos.base.v1beta1.ICoin[] | null; + balances0?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - balances1?: proto.cosmos.base.v1beta1.ICoin[] | null; + balances1?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - balances2?: proto.cosmos.base.v1beta1.ICoin[] | null; + balances2?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/views/keys/key/key.component.ts b/projects/portal/src/app/views/keys/key/key.component.ts index 9d317f8aa..a244bd30c 100644 --- a/projects/portal/src/app/views/keys/key/key.component.ts +++ b/projects/portal/src/app/views/keys/key/key.component.ts @@ -1,7 +1,7 @@ import { KeyDeleteDialogService } from '../../../models/keys/key-delete-dialog.service'; import { Key } from '../../../models/keys/key.model'; import { Component, OnInit, Input } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'view-key', @@ -21,17 +21,17 @@ export class KeyComponent implements OnInit { @Input() faucets?: | { - hasFaucet: boolean; - faucetURL: string; - denom: string; - creditAmount: number; - maxCredit: number; - }[] + hasFaucet: boolean; + faucetURL: string; + denom: string; + creditAmount: number; + maxCredit: number; + }[] | null; - constructor(private readonly keyDeleteDialogService: KeyDeleteDialogService) {} + constructor(private readonly keyDeleteDialogService: KeyDeleteDialogService) { } - ngOnInit(): void {} + ngOnInit(): void { } openDeleteDialog(id: string) { this.keyDeleteDialogService.openKeyDeleteDialog(id); diff --git a/projects/portal/src/app/views/mint/cdps/cdp/clear/clear.component.ts b/projects/portal/src/app/views/mint/cdps/cdp/clear/clear.component.ts index 80465f655..aa34ade4e 100644 --- a/projects/portal/src/app/views/mint/cdps/cdp/clear/clear.component.ts +++ b/projects/portal/src/app/views/mint/cdps/cdp/clear/clear.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; export type ClearCdpOnSubmitEvent = { @@ -7,9 +7,9 @@ export type ClearCdpOnSubmitEvent = { privateKey: Uint8Array; ownerAddr: cosmosclient.AccAddress; collateralType: string; - repayment: proto.cosmos.base.v1beta1.ICoin; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - balances: proto.cosmos.base.v1beta1.ICoin[]; + repayment: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[]; }; @Component({ @@ -28,19 +28,19 @@ export class ClearComponent implements OnInit { collateralType?: string | null; @Input() - repaymentDenom?: proto.cosmos.base.v1beta1.ICoin | null; + repaymentDenom?: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - balances?: proto.cosmos.base.v1beta1.ICoin[] | null; + balances?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() appSubmit: EventEmitter; public repayment_amount: string; - public selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + public selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; constructor() { this.appSubmit = new EventEmitter(); @@ -53,7 +53,7 @@ export class ClearComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit( privateKeyString: string, diff --git a/projects/portal/src/app/views/mint/cdps/cdp/deposit/deposit.component.ts b/projects/portal/src/app/views/mint/cdps/cdp/deposit/deposit.component.ts index b1c6162ef..fd23f171d 100644 --- a/projects/portal/src/app/views/mint/cdps/cdp/deposit/deposit.component.ts +++ b/projects/portal/src/app/views/mint/cdps/cdp/deposit/deposit.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; export type DepositCdpOnSubmitEvent = { @@ -7,9 +7,9 @@ export type DepositCdpOnSubmitEvent = { privateKey: Uint8Array; ownerAddr: cosmosclient.AccAddress; collateralType: string; - collateral: proto.cosmos.base.v1beta1.ICoin; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - balances: proto.cosmos.base.v1beta1.ICoin[]; + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[]; }; @Component({ @@ -28,26 +28,26 @@ export class DepositComponent implements OnInit { collateralType?: string | null; @Input() - denom?: proto.cosmos.base.v1beta1.ICoin | null; + denom?: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - balances?: proto.cosmos.base.v1beta1.ICoin[] | null; + balances?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() appSubmit: EventEmitter; public collateral_amount: string; - public selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + public selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; constructor() { this.appSubmit = new EventEmitter(); this.collateral_amount = ''; } - ngOnInit(): void {} + ngOnInit(): void { } ngOnChanges(): void { if (this.minimumGasPrices && this.minimumGasPrices.length > 0) { diff --git a/projects/portal/src/app/views/mint/cdps/cdp/issue/issue.component.ts b/projects/portal/src/app/views/mint/cdps/cdp/issue/issue.component.ts index fb909564e..60fab810a 100644 --- a/projects/portal/src/app/views/mint/cdps/cdp/issue/issue.component.ts +++ b/projects/portal/src/app/views/mint/cdps/cdp/issue/issue.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; export type IssueCdpOnSubmitEvent = { @@ -7,9 +7,9 @@ export type IssueCdpOnSubmitEvent = { privateKey: Uint8Array; ownerAddr: cosmosclient.AccAddress; collateralType: string; - principal: proto.cosmos.base.v1beta1.ICoin; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - balances: proto.cosmos.base.v1beta1.ICoin[]; + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[]; }; @Component({ @@ -34,16 +34,16 @@ export class IssueComponent implements OnInit { issueLimit?: number | null; @Input() - balances?: proto.cosmos.base.v1beta1.ICoin[] | null; + balances?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() appSubmit: EventEmitter; public principal_amount: string; - public selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + public selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; constructor() { this.appSubmit = new EventEmitter(); @@ -56,7 +56,7 @@ export class IssueComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit( privateKeyString: string, diff --git a/projects/portal/src/app/views/mint/cdps/cdp/withdraw/withdraw.component.ts b/projects/portal/src/app/views/mint/cdps/cdp/withdraw/withdraw.component.ts index 45370b26c..86b78694d 100644 --- a/projects/portal/src/app/views/mint/cdps/cdp/withdraw/withdraw.component.ts +++ b/projects/portal/src/app/views/mint/cdps/cdp/withdraw/withdraw.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; export type WithdrawCdpOnSubmitEvent = { @@ -7,9 +7,9 @@ export type WithdrawCdpOnSubmitEvent = { privateKey: Uint8Array; ownerAddr: cosmosclient.AccAddress; collateralType: string; - collateral: proto.cosmos.base.v1beta1.ICoin; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - balances: proto.cosmos.base.v1beta1.ICoin[]; + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[]; }; @Component({ @@ -34,16 +34,16 @@ export class WithdrawComponent implements OnInit { withdrawLimit?: number | null; @Input() - balances?: proto.cosmos.base.v1beta1.ICoin[] | null; + balances?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() appSubmit: EventEmitter; public collateral_amount: string; - public selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + public selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; constructor() { this.appSubmit = new EventEmitter(); @@ -56,7 +56,7 @@ export class WithdrawComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit( privateKeyString: string, diff --git a/projects/portal/src/app/views/mint/cdps/create/create.component.ts b/projects/portal/src/app/views/mint/cdps/create/create.component.ts index d1a20cf71..4911ac852 100644 --- a/projects/portal/src/app/views/mint/cdps/create/create.component.ts +++ b/projects/portal/src/app/views/mint/cdps/create/create.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; import { ununifi } from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @@ -9,10 +9,10 @@ export type CreateCdpOnSubmitEvent = { key: Key; privateKey: Uint8Array; collateralType: string; - collateral: proto.cosmos.base.v1beta1.ICoin; - principal: proto.cosmos.base.v1beta1.ICoin; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - balances: proto.cosmos.base.v1beta1.ICoin[]; + collateral: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + principal: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[]; }; @Component({ @@ -37,10 +37,10 @@ export class CreateComponent implements OnInit { selectedCollateralParam?: ununifi.cdp.ICollateralParam | null; @Input() - minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() - balances?: proto.cosmos.base.v1beta1.ICoin[] | null; + balances?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() principalLimit?: number | null; @@ -60,7 +60,7 @@ export class CreateComponent implements OnInit { @Output() appCollateralAmountChanged: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; constructor(private readonly snackBar: MatSnackBar) { this.appSubmit = new EventEmitter(); @@ -74,7 +74,7 @@ export class CreateComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } onSubmit( collateralType: string, diff --git a/projects/portal/src/app/views/slashing/unjail-simple/unjail-simple.component.ts b/projects/portal/src/app/views/slashing/unjail-simple/unjail-simple.component.ts index 26b96a431..604f10a18 100644 --- a/projects/portal/src/app/views/slashing/unjail-simple/unjail-simple.component.ts +++ b/projects/portal/src/app/views/slashing/unjail-simple/unjail-simple.component.ts @@ -9,7 +9,7 @@ import { ViewChild, } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'app-view-unjail-simple', @@ -20,23 +20,23 @@ export class UnjailSimpleComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() delegator_address?: string | null; @Input() validator_address?: string | null; - @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + @Input() minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() submitUnjail = new EventEmitter<{ validator_address: string; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; privateKey: string; }>(); @ViewChild('fileInputRef') fileInputRef?: ElementRef; - minimumGasPrice?: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; file: File | null; jsonString: string | null; privateWallet: | (StoredWallet & { - privateKey: string; - }) + privateKey: string; + }) | null; constructor(private readonly snackBar: MatSnackBar) { @@ -51,7 +51,7 @@ export class UnjailSimpleComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } async onChangeFile($event: Event): Promise { console.log('onChangeFile'); diff --git a/projects/portal/src/app/views/slashing/unjail/unjail.component.ts b/projects/portal/src/app/views/slashing/unjail/unjail.component.ts index 82ddd8811..0151397b3 100644 --- a/projects/portal/src/app/views/slashing/unjail/unjail.component.ts +++ b/projects/portal/src/app/views/slashing/unjail/unjail.component.ts @@ -1,7 +1,7 @@ import { StoredWallet } from '../../../models/wallets/wallet.model'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'app-view-unjail', @@ -12,16 +12,16 @@ export class UnjailComponent implements OnInit { @Input() currentStoredWallet?: StoredWallet | null; @Input() delegator_address?: string | null; @Input() validator_address?: string | null; - @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + @Input() minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() submitUnjail = new EventEmitter<{ validator_address: string; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; }>(); - minimumGasPrice?: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; - constructor(private readonly snackBar: MatSnackBar) {} + constructor(private readonly snackBar: MatSnackBar) { } ngOnChanges(): void { if (this.minimumGasPrices && this.minimumGasPrices.length > 0) { @@ -29,7 +29,7 @@ export class UnjailComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmitUnjail(validator_address: string, minimumGasPriceAmount: string): Promise { if (!this.currentStoredWallet) { diff --git a/projects/portal/src/app/views/staking/create-validator-multiple/create-validator-multiple.component.ts b/projects/portal/src/app/views/staking/create-validator-multiple/create-validator-multiple.component.ts index 2b1fedbb6..f09aabd01 100644 --- a/projects/portal/src/app/views/staking/create-validator-multiple/create-validator-multiple.component.ts +++ b/projects/portal/src/app/views/staking/create-validator-multiple/create-validator-multiple.component.ts @@ -16,7 +16,7 @@ import { } from '@angular/core'; import { MatDialog, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { NgxDropzoneChangeEvent } from 'ngx-dropzone'; import { RejectedFile } from 'ngx-dropzone/lib/ngx-dropzone.service'; @@ -47,17 +47,17 @@ export class CreateValidatorMultipleComponent implements OnInit { @Input() error?: string; @Input() setError?: (error: string) => void; @Input() success?: boolean; - @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + @Input() minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() redirectUrls?: string[]; @Output() submitCreateValidators = new EventEmitter(); @ViewChild('fileInputRef') fileInputRef?: ElementRef; - minimumGasPrice?: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; templateToRender: InterfaceTemplateToRender = 'loading'; - constructor(private readonly snackBar: MatSnackBar, public dialog: MatDialog) {} + constructor(private readonly snackBar: MatSnackBar, public dialog: MatDialog) { } openDialog() { this.dialog.open(ValidatorDialog, { @@ -98,7 +98,7 @@ export class CreateValidatorMultipleComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } checkInput(input: any) { if (!input) { @@ -288,5 +288,5 @@ export class CreateValidatorMultipleComponent implements OnInit { templateUrl: 'validator-dialog.html', }) export class ValidatorDialog { - constructor(@Inject(MAT_DIALOG_DATA) public data: { redirectUrls: string[] | undefined }) {} + constructor(@Inject(MAT_DIALOG_DATA) public data: { redirectUrls: string[] | undefined }) { } } diff --git a/projects/portal/src/app/views/staking/create-validator-simple/create-validator-simple.component.ts b/projects/portal/src/app/views/staking/create-validator-simple/create-validator-simple.component.ts index 48eecb60c..5597e2ca8 100644 --- a/projects/portal/src/app/views/staking/create-validator-simple/create-validator-simple.component.ts +++ b/projects/portal/src/app/views/staking/create-validator-simple/create-validator-simple.component.ts @@ -10,7 +10,7 @@ import { ViewChild, } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'app-view-create-validator-simple', @@ -35,24 +35,24 @@ export class CreateValidatorSimpleComponent implements OnInit { @Input() ip?: string | null; @Input() node_id?: string | null; @Input() pubkey?: string | null; - @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + @Input() minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() submitCreateValidator = new EventEmitter< CreateValidatorData & { - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; privateKey: string; } >(); @ViewChild('fileInputRef') fileInputRef?: ElementRef; - minimumGasPrice?: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; file: File | null; jsonString: string | null; privateWallet: | (StoredWallet & { - privateKey: string; - }) + privateKey: string; + }) | null; constructor(private readonly snackBar: MatSnackBar) { @@ -67,7 +67,7 @@ export class CreateValidatorSimpleComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } async onChangeFile($event: Event): Promise { if ($event === null || $event.target === null) { diff --git a/projects/portal/src/app/views/staking/create-validator/create-validator.component.ts b/projects/portal/src/app/views/staking/create-validator/create-validator.component.ts index 509e7e35d..5e0594c8e 100644 --- a/projects/portal/src/app/views/staking/create-validator/create-validator.component.ts +++ b/projects/portal/src/app/views/staking/create-validator/create-validator.component.ts @@ -2,7 +2,7 @@ import { CreateValidatorData } from '../../../models/cosmos/staking.model'; import { StoredWallet } from '../../../models/wallets/wallet.model'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'app-view-create-validator', @@ -27,17 +27,17 @@ export class CreateValidatorComponent implements OnInit { @Input() ip?: string | null; @Input() node_id?: string | null; @Input() pubkey?: string | null; - @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + @Input() minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() submitCreateValidator = new EventEmitter< CreateValidatorData & { - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; } >(); - minimumGasPrice?: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; - constructor(private readonly snackBar: MatSnackBar) {} + constructor(private readonly snackBar: MatSnackBar) { } ngOnChanges(): void { if (this.minimumGasPrices && this.minimumGasPrices.length > 0) { @@ -45,7 +45,7 @@ export class CreateValidatorComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmitCreateValidator( moniker: string, diff --git a/projects/portal/src/app/views/txs/tx/tx.component.ts b/projects/portal/src/app/views/txs/tx/tx.component.ts index 253c75095..8cfff4a45 100644 --- a/projects/portal/src/app/views/txs/tx/tx.component.ts +++ b/projects/portal/src/app/views/txs/tx/tx.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, Input } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { CosmosTxV1beta1GetTxResponse } from '@cosmos-client/core/esm/openapi'; @Component({ @@ -11,9 +11,9 @@ export class TxComponent implements OnInit { @Input() tx?: CosmosTxV1beta1GetTxResponse | null; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } unpackMsg(value: any) { try { diff --git a/projects/portal/src/app/views/vote/proposals/proposal/proposal.component.ts b/projects/portal/src/app/views/vote/proposals/proposal/proposal.component.ts index 7014c618f..34f573b38 100644 --- a/projects/portal/src/app/views/vote/proposals/proposal/proposal.component.ts +++ b/projects/portal/src/app/views/vote/proposals/proposal/proposal.component.ts @@ -1,6 +1,6 @@ import { ProposalContent } from '../proposals.component'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027Proposals, InlineResponse20029Deposits, @@ -44,7 +44,7 @@ export class ProposalComponent implements OnInit { this.appClickDeposit = new EventEmitter(); } - ngOnInit(): void {} + ngOnInit(): void { } unpackContent(value: any) { try { diff --git a/projects/portal/src/app/views/vote/proposals/proposals.component.ts b/projects/portal/src/app/views/vote/proposals/proposals.component.ts index 18be36c60..1d0944ea1 100644 --- a/projects/portal/src/app/views/vote/proposals/proposals.component.ts +++ b/projects/portal/src/app/views/vote/proposals/proposals.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027FinalTallyResult, InlineResponse20027Proposals, @@ -30,7 +30,7 @@ export class ProposalsComponent implements OnInit { this.appClickVote = new EventEmitter(); } - ngOnInit(): void {} + ngOnInit(): void { } unpackContent(value: any) { try { diff --git a/projects/shared/src/lib/models/cosmos-sdk/cosmos-sdk.service.ts b/projects/shared/src/lib/models/cosmos-sdk/cosmos-sdk.service.ts index 12326bb8b..2706bf0af 100644 --- a/projects/shared/src/lib/models/cosmos-sdk/cosmos-sdk.service.ts +++ b/projects/shared/src/lib/models/cosmos-sdk/cosmos-sdk.service.ts @@ -1,6 +1,6 @@ import { Config, ConfigService } from '../config/config.service'; import { Injectable } from '@angular/core'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable } from 'rxjs'; import { first, map } from 'rxjs/operators'; diff --git a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.model.ts b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.model.ts index 874266455..e48bc48ab 100644 --- a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.model.ts +++ b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.model.ts @@ -1,14 +1,14 @@ -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20049 } from '@cosmos-client/core/esm/openapi'; export type SimulatedTxResultResponse = { simulatedResultData?: InlineResponse20049; - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; - estimatedGasUsedWithMargin: proto.cosmos.base.v1beta1.ICoin; - estimatedFeeWithMargin: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + estimatedGasUsedWithMargin: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + estimatedFeeWithMargin: cosmosclient.proto.cosmos.base.v1beta1.ICoin; }; export type GasSetting = { - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin; + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; }; diff --git a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts index 4e1a4a315..2702b6209 100644 --- a/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts +++ b/projects/shared/src/lib/models/cosmos/tx/common/tx-common.service.ts @@ -6,7 +6,7 @@ import { UnunifiWalletService } from '../../../wallets/ununifi-wallet/ununifi-wa import { CosmosWallet, WalletType } from '../../../wallets/wallet.model'; import { SimulatedTxResultResponse } from './tx-common.model'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; @@ -19,7 +19,7 @@ export class TxCommonService { private readonly keplrService: KeplrService, private readonly metaMaskService: MetaMaskService, private readonly ununifiWalletService: UnunifiWalletService, - ) {} + ) { } canonicalizeAccAddress(address: string) { const canonicalized = address.replace(/\s+/g, ''); @@ -27,9 +27,9 @@ export class TxCommonService { } validateBalanceBeforeSimulation( - usageAmount: proto.cosmos.base.v1beta1.ICoin[], - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, - balances: proto.cosmos.base.v1beta1.ICoin[], + usageAmount: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + balances: cosmosclient.proto.cosmos.base.v1beta1.ICoin[], ) { const feeDenom = minimumGasPrice.denom; const simulationFeeAmount = 1; @@ -49,10 +49,10 @@ export class TxCommonService { async getBaseAccount( cosmosPublicKey: cosmosclient.PubKey, - ): Promise { + ): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); const accAddress = cosmosclient.AccAddress.fromPublicKey(cosmosPublicKey); - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk, accAddress) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -69,9 +69,9 @@ export class TxCommonService { async getBaseAccountFromAddress( address: cosmosclient.AccAddress, - ): Promise { + ): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); - const account = await rest.auth + const account = await cosmosclient.rest.auth .account(sdk, address) .then((res) => cosmosclient.codec.protoJSONToInstance( @@ -89,25 +89,25 @@ export class TxCommonService { async buildTxBuilder( messages: any[], cosmosPublicKey: cosmosclient.PubKey, - baseAccount: proto.cosmos.auth.v1beta1.BaseAccount, - gas: proto.cosmos.base.v1beta1.ICoin | null | undefined, - fee: proto.cosmos.base.v1beta1.ICoin | null | undefined, + baseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null | undefined, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin | null | undefined, ): Promise { const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); - const packedAnyMessages: proto.google.protobuf.IAny[] = messages.map((message) => + const packedAnyMessages: cosmosclient.proto.google.protobuf.IAny[] = messages.map((message) => cosmosclient.codec.instanceToProtoAny(message), ); - const txBody = new proto.cosmos.tx.v1beta1.TxBody({ + const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: packedAnyMessages, }); - const authInfo = new proto.cosmos.tx.v1beta1.AuthInfo({ + const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ signer_infos: [ { public_key: cosmosclient.codec.instanceToProtoAny(cosmosPublicKey), mode_info: { single: { - mode: proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, + mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT, }, }, sequence: baseAccount.sequence, @@ -124,7 +124,7 @@ export class TxCommonService { async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, currentCosmosWallet: CosmosWallet, privateKey?: string, ): Promise { @@ -150,7 +150,7 @@ export class TxCommonService { async signTxWithPrivateKey( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, privateKey?: string, ): Promise { if (privateKey) { @@ -166,7 +166,7 @@ export class TxCommonService { async signTxWithKeplr( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { const signedTxBuilder = await this.keplrService.signTx(txBuilder, signerBaseAccount); return signedTxBuilder; @@ -175,7 +175,7 @@ export class TxCommonService { // Todo: This is dummy function and need to implement later. signTxWithLedger( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): cosmosclient.TxBuilder { throw Error('Currently signing with Ledger is not supported!'); } @@ -183,14 +183,14 @@ export class TxCommonService { // Todo: This is dummy function and need to implement later. signTxWithKeyStation( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): cosmosclient.TxBuilder { throw Error('Currently signing with KeyStation is not supported!'); } async signTxWithMetaMask( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { const signedTxBuilder = await this.metaMaskService.signTx(txBuilder, signerBaseAccount); return signedTxBuilder; @@ -198,7 +198,7 @@ export class TxCommonService { async simulateTx( txBuilder: cosmosclient.TxBuilder, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { if (minimumGasPrice.amount == '0' || !gasRatio) { @@ -216,7 +216,7 @@ export class TxCommonService { } const sdk = await this.cosmosSDK.sdk().then((sdk) => sdk.rest); - // restore json from txBuilder + // cosmosclient.rest ore json from txBuilder const txForSimulation = txBuilder.toProtoJSON() as any; console.log(txForSimulation); @@ -232,7 +232,7 @@ export class TxCommonService { } // simulate - const simulatedResult = await rest.tx.simulate(sdk, { + const simulatedResult = await cosmosclient.rest.tx.simulate(sdk, { tx: txForSimulation, }); console.log('simulatedResult', simulatedResult); @@ -275,9 +275,9 @@ export class TxCommonService { console.log(txBuilder); // broadcast tx - const result = await rest.tx.broadcastTx(sdk, { + const result = await cosmosclient.rest.tx.broadcastTx(sdk, { tx_bytes: txBuilder.txBytes(), - mode: rest.tx.BroadcastTxMode.Block, + mode: cosmosclient.rest.tx.BroadcastTxMode.Block, }); // check broadcast tx error diff --git a/projects/shared/src/lib/models/db/db.service.ts b/projects/shared/src/lib/models/db/db.service.ts index 59a8a659c..4260648e8 100644 --- a/projects/shared/src/lib/models/db/db.service.ts +++ b/projects/shared/src/lib/models/db/db.service.ts @@ -1,7 +1,7 @@ import { KeyType } from '../keys/key.model'; import { WalletType } from '../wallets/wallet.model'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { PubKey } from '@cosmos-client/core/esm/types'; import Dexie from 'dexie'; @@ -34,7 +34,7 @@ export class DbService { let cosmosPublicKey: PubKey; switch (key_type) { case KeyType.secp256k1: - cosmosPublicKey = new proto.cosmos.crypto.secp256k1.PubKey({ + cosmosPublicKey = new cosmosclient.proto.cosmos.crypto.secp256k1.PubKey({ key: Uint8Array.from(Buffer.from(public_key, 'hex')), }); break; diff --git a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.application.service.ts b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.application.service.ts index f75b5bcc8..0f30c9285 100644 --- a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.application.service.ts +++ b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.application.service.ts @@ -13,7 +13,7 @@ import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import { LoadingDialogService } from 'ng-loading-dialog'; import { take } from 'rxjs/operators'; @@ -29,7 +29,7 @@ export class NftTxApplicationService { private readonly loadingDialog: LoadingDialogService, private readonly staking: NftTxInfrastructureService, private readonly walletService: WalletService, - ) {} + ) { } async openNftMenuDialog(nft: Nft): Promise { await this.dialog @@ -48,7 +48,7 @@ export class NftTxApplicationService { async listNft( msgListNftData: MsgListNftData, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ) { // get public key @@ -65,8 +65,8 @@ export class NftTxApplicationService { // simulate let simulatedResultData: SimulatedTxResultResponse; - let gas: proto.cosmos.base.v1beta1.ICoin; - let fee: proto.cosmos.base.v1beta1.ICoin; + let gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin; + let fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; const dialogRefSimulating = this.loadingDialog.open('Simulating...'); diff --git a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.infrastructure.service.ts b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.infrastructure.service.ts index d7d6d2069..f09a4acc5 100644 --- a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.infrastructure.service.ts +++ b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.infrastructure.service.ts @@ -5,7 +5,7 @@ import { CosmosWallet } from '../../../wallets/wallet.model'; import { MsgListNftData } from './nft-tx.model'; import { INftTxInfrastructureService } from './nft-tx.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; @Injectable({ @@ -15,14 +15,14 @@ export class NftTxInfrastructureService implements INftTxInfrastructureService { constructor( private readonly cosmosSDK: CosmosSDKService, private readonly txCommonService: TxCommonService, - ) {} + ) { } // List NFT async listNft( msgListNftData: MsgListNftData, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { const cosmosPublicKey = currentCosmosWallet.public_key; @@ -47,14 +47,14 @@ export class NftTxInfrastructureService implements INftTxInfrastructureService { async simulateToListNft( msgListNftData: MsgListNftData, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { - const dummyFee: proto.cosmos.base.v1beta1.ICoin = { + const dummyFee: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; - const dummyGas: proto.cosmos.base.v1beta1.ICoin = { + const dummyGas: cosmosclient.proto.cosmos.base.v1beta1.ICoin = { denom: minimumGasPrice.denom, amount: '1', }; @@ -70,8 +70,8 @@ export class NftTxInfrastructureService implements INftTxInfrastructureService { private async buildListNftTxBuilder( msgListNftData: MsgListNftData, cosmosPublicKey: cosmosclient.PubKey, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, ): Promise { const baseAccount = await this.txCommonService.getBaseAccount(cosmosPublicKey); if (!baseAccount) { @@ -92,11 +92,11 @@ export class NftTxInfrastructureService implements INftTxInfrastructureService { private buildMsgListNft( msgListNftData: MsgListNftData, - ): proto.cosmos.staking.v1beta1.MsgDelegate { + ): cosmosclient.proto.cosmos.staking.v1beta1.MsgDelegate { // Todo: Currently dummy msgDelegate is created. Need to fix to ununifi.nftmarket.MsgListNft // Todo: After install new ununifi-client version, enable following implementation and remove current implementation. // const msgListNft = new ununifi.nftmarket.MsgListNft(msgListNftData); - const msgListNft = new proto.cosmos.staking.v1beta1.MsgDelegate({ + const msgListNft = new cosmosclient.proto.cosmos.staking.v1beta1.MsgDelegate({ delegator_address: '', validator_address: '', amount: { diff --git a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.service.ts b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.service.ts index f1cca63bd..bedd7e9e1 100644 --- a/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.service.ts +++ b/projects/shared/src/lib/models/ununifi/tx/nft/nft-tx.service.ts @@ -3,22 +3,22 @@ import { CosmosWallet } from '../../../wallets/wallet.model'; import { NftTxInfrastructureService } from './nft-tx.infrastructure.service'; import { MsgListNftData } from './nft-tx.model'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; export interface INftTxInfrastructureService { simulateToListNft( msgListNftData: MsgListNftData, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise; listNft( msgListNftData: MsgListNftData, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise; } @@ -37,8 +37,8 @@ export class NftTxService { async listNft( msgListNftData: MsgListNftData, currentCosmosWallet: CosmosWallet, - gas: proto.cosmos.base.v1beta1.ICoin, - fee: proto.cosmos.base.v1beta1.ICoin, + gas: cosmosclient.proto.cosmos.base.v1beta1.ICoin, + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin, privateKey?: string, ): Promise { return this.iNftTxInfrastructureService.listNft( @@ -53,7 +53,7 @@ export class NftTxService { async simulateToListNft( msgListNftData: MsgListNftData, cosmosPublicKey: cosmosclient.PubKey, - minimumGasPrice: proto.cosmos.base.v1beta1.ICoin, + minimumGasPrice: cosmosclient.proto.cosmos.base.v1beta1.ICoin, gasRatio: number, ): Promise { return await this.iNftTxInfrastructureService.simulateToListNft( diff --git a/projects/shared/src/lib/models/wallets/keplr/keplr.infrastructure.service.ts b/projects/shared/src/lib/models/wallets/keplr/keplr.infrastructure.service.ts index 8139b2d2d..a3d1fbfa7 100644 --- a/projects/shared/src/lib/models/wallets/keplr/keplr.infrastructure.service.ts +++ b/projects/shared/src/lib/models/wallets/keplr/keplr.infrastructure.service.ts @@ -5,7 +5,7 @@ import { StoredWallet, WalletType } from '../wallet.model'; import { IKeplrInfrastructureService } from './keplr.service'; import { Injectable } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { ChainInfo, Key, Window as KeplrWindow } from '@keplr-wallet/types'; import { LoadingDialogService } from 'ng-loading-dialog'; @@ -17,7 +17,7 @@ export interface signKeplr { declare global { // eslint-disable-next-line @typescript-eslint/no-empty-interface - interface Window extends KeplrWindow {} + interface Window extends KeplrWindow { } } @Injectable({ @@ -28,7 +28,7 @@ export class KeplrInfrastructureService implements IKeplrInfrastructureService { private readonly loadingDialog: LoadingDialogService, private snackBar: MatSnackBar, private configService: ConfigService, - ) {} + ) { } private async getKey(): Promise { if (!window.keplr) { @@ -188,7 +188,7 @@ export class KeplrInfrastructureService implements IKeplrInfrastructureService { async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { const signDoc = txBuilder.signDoc(signerBaseAccount.account_number); const signKeplr = await this.signDirect( diff --git a/projects/shared/src/lib/models/wallets/keplr/keplr.service.ts b/projects/shared/src/lib/models/wallets/keplr/keplr.service.ts index aa7f88aa4..aedab74fc 100644 --- a/projects/shared/src/lib/models/wallets/keplr/keplr.service.ts +++ b/projects/shared/src/lib/models/wallets/keplr/keplr.service.ts @@ -1,13 +1,13 @@ import { StoredWallet } from '../wallet.model'; import { KeplrInfrastructureService } from './keplr.infrastructure.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export interface IKeplrInfrastructureService { connectWallet: () => Promise; signTx: ( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ) => Promise; } @@ -27,7 +27,7 @@ export class KeplrService { async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { return await this.iKeplrInfrastructureService.signTx(txBuilder, signerBaseAccount); } diff --git a/projects/shared/src/lib/models/wallets/metamask/metamask.infrastructure.service.ts b/projects/shared/src/lib/models/wallets/metamask/metamask.infrastructure.service.ts index 38e191b83..ace85b1a4 100644 --- a/projects/shared/src/lib/models/wallets/metamask/metamask.infrastructure.service.ts +++ b/projects/shared/src/lib/models/wallets/metamask/metamask.infrastructure.service.ts @@ -4,7 +4,7 @@ import { KeyType } from '../../keys/key.model'; import { StoredWallet, WalletType } from '../wallet.model'; import { IMetaMaskInfrastructureService } from './metamask.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import detectEthereumProvider from '@metamask/detect-provider'; import { ethers } from 'ethers'; import { take } from 'rxjs/operators'; @@ -13,7 +13,7 @@ import { take } from 'rxjs/operators'; providedIn: 'root', }) export class MetaMaskInfrastructureService implements IMetaMaskInfrastructureService { - constructor(private readonly configService: ConfigService) {} + constructor(private readonly configService: ConfigService) { } private messageToDigest(message: string): Uint8Array { const messageHash = ethers.utils.hashMessage(message); @@ -99,7 +99,7 @@ export class MetaMaskInfrastructureService implements IMetaMaskInfrastructureSer async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { const txJson = txBuilder.toProtoJSON() as any; diff --git a/projects/shared/src/lib/models/wallets/metamask/metamask.service.ts b/projects/shared/src/lib/models/wallets/metamask/metamask.service.ts index 541177e31..1861fb043 100644 --- a/projects/shared/src/lib/models/wallets/metamask/metamask.service.ts +++ b/projects/shared/src/lib/models/wallets/metamask/metamask.service.ts @@ -1,13 +1,13 @@ import { StoredWallet } from '../wallet.model'; import { MetaMaskInfrastructureService } from './metamask.infrastructure.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export interface IMetaMaskInfrastructureService { connectWallet: () => Promise; signTx: ( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ) => Promise; } @@ -27,7 +27,7 @@ export class MetaMaskService { async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { return await this.iMetaMaskInfrastructureService.signTx(txBuilder, signerBaseAccount); } diff --git a/projects/shared/src/lib/models/wallets/ununifi-wallet/ununifi-wallet.infrastructure.service.ts b/projects/shared/src/lib/models/wallets/ununifi-wallet/ununifi-wallet.infrastructure.service.ts index 0f334f00e..36054d284 100644 --- a/projects/shared/src/lib/models/wallets/ununifi-wallet/ununifi-wallet.infrastructure.service.ts +++ b/projects/shared/src/lib/models/wallets/ununifi-wallet/ununifi-wallet.infrastructure.service.ts @@ -16,7 +16,7 @@ import { IUnunifiWalletInfrastructureService } from './ununifi-wallet.service'; import { Injectable } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { LoadingDialogService } from 'ng-loading-dialog'; @Injectable({ @@ -28,7 +28,7 @@ export class UnunifiWalletInfrastructureService implements IUnunifiWalletInfrast private readonly dialog: MatDialog, private snackBar: MatSnackBar, private loadingDialog: LoadingDialogService, - ) {} + ) { } private async ununifiSelectWallet(): Promise { const selectedStoredWallet = await this.openUnunifiSelectWalletDialog(); @@ -246,7 +246,7 @@ export class UnunifiWalletInfrastructureService implements IUnunifiWalletInfrast async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { const privateWallet: StoredWallet & { privateKey: string } = await this.openUnunifiKeyFormDialog(); @@ -277,7 +277,7 @@ export class UnunifiWalletInfrastructureService implements IUnunifiWalletInfrast async signTxWithPrivateKey( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, privateKey: string, ): Promise { const cosmosPrivateKey: cosmosclient.PrivKey | undefined = createCosmosPrivateKeyFromString( diff --git a/projects/shared/src/lib/models/wallets/ununifi-wallet/ununifi-wallet.service.ts b/projects/shared/src/lib/models/wallets/ununifi-wallet/ununifi-wallet.service.ts index 931354737..be19b993a 100644 --- a/projects/shared/src/lib/models/wallets/ununifi-wallet/ununifi-wallet.service.ts +++ b/projects/shared/src/lib/models/wallets/ununifi-wallet/ununifi-wallet.service.ts @@ -1,17 +1,17 @@ import { StoredWallet } from '../wallet.model'; import { UnunifiWalletInfrastructureService } from './ununifi-wallet.infrastructure.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export interface IUnunifiWalletInfrastructureService { connectWallet(): Promise; signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise; signTxWithPrivateKey( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, privateKey?: string, ): Promise; } @@ -32,14 +32,14 @@ export class UnunifiWalletService { async signTx( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, ): Promise { return await this.iUnunifiWalletInfrastructureService.signTx(txBuilder, signerBaseAccount); } async signTxWithPrivateKey( txBuilder: cosmosclient.TxBuilder, - signerBaseAccount: proto.cosmos.auth.v1beta1.BaseAccount, + signerBaseAccount: cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount, privateKey?: string, ): Promise { return await this.iUnunifiWalletInfrastructureService.signTxWithPrivateKey( diff --git a/projects/shared/src/lib/models/wallets/wallet.infrastructure.service.ts b/projects/shared/src/lib/models/wallets/wallet.infrastructure.service.ts index 0ef9060ad..f6613f29a 100644 --- a/projects/shared/src/lib/models/wallets/wallet.infrastructure.service.ts +++ b/projects/shared/src/lib/models/wallets/wallet.infrastructure.service.ts @@ -3,7 +3,7 @@ import { KeyType } from '../keys/key.model'; import { CosmosWallet, StoredWallet, Wallet, WalletType } from './wallet.model'; import { IWalletInfrastructure } from './wallet.service'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import Dexie from 'dexie'; import { BehaviorSubject } from 'rxjs'; @@ -85,7 +85,7 @@ export class WalletInfrastructureService implements IWalletInfrastructure { } convertStoredWalletToCosmosWallet(storedWallet: StoredWallet): CosmosWallet { - const public_key: CosmosWallet['public_key'] = new proto.cosmos.crypto.secp256k1.PubKey({ + const public_key: CosmosWallet['public_key'] = new cosmosclient.proto.cosmos.crypto.secp256k1.PubKey({ key: Uint8Array.from(Buffer.from(storedWallet.public_key, 'hex')), }); const address: cosmosclient.AccAddress = cosmosclient.AccAddress.fromString( diff --git a/projects/shared/src/lib/models/wallets/wallet.model.ts b/projects/shared/src/lib/models/wallets/wallet.model.ts index 496b48f89..5bf54996c 100644 --- a/projects/shared/src/lib/models/wallets/wallet.model.ts +++ b/projects/shared/src/lib/models/wallets/wallet.model.ts @@ -1,5 +1,5 @@ import { KeyType } from '../keys/key.model'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { PubKey } from '@cosmos-client/core/esm/types'; // Note: Now, only ununifi is supported. diff --git a/projects/shared/src/lib/utils/converter.ts b/projects/shared/src/lib/utils/converter.ts index faa7c4982..eb2ca6ab8 100644 --- a/projects/shared/src/lib/utils/converter.ts +++ b/projects/shared/src/lib/utils/converter.ts @@ -1,4 +1,4 @@ -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export const convertHexStringToUint8Array = (hexString: string): Uint8Array | undefined => { try { @@ -28,28 +28,28 @@ export const convertUint8ArrayToHexString = (uint8Array: Uint8Array): string | u export const convertUnknownAccountToTypedAccount = ( unknownAccount: unknown, ): - | proto.cosmos.auth.v1beta1.BaseAccount - | proto.cosmos.vesting.v1beta1.BaseVestingAccount - | proto.cosmos.vesting.v1beta1.ContinuousVestingAccount - | proto.cosmos.vesting.v1beta1.DelayedVestingAccount - | proto.cosmos.vesting.v1beta1.PeriodicVestingAccount - | proto.cosmos.vesting.v1beta1.PermanentLockedAccount - | proto.cosmos.auth.v1beta1.ModuleAccount + | cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount + | cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount | null | undefined => { - if (unknownAccount instanceof proto.cosmos.auth.v1beta1.BaseAccount) { + if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.BaseVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.auth.v1beta1.ModuleAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount) { return unknownAccount; } else if (unknownAccount === undefined) { return unknownAccount; @@ -64,51 +64,51 @@ export const convertUnknownAccountToTypedAccount = ( export const convertUnknownAccountToBaseAccount = ( unknownAccount: unknown, -): proto.cosmos.auth.v1beta1.BaseAccount | null | undefined => { +): cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount | null | undefined => { if (unknownAccount === undefined) { return unknownAccount; } else if (unknownAccount === null) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.auth.v1beta1.BaseAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { return unknownAccount; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.BaseVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount) { if (unknownAccount.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount(unknownAccount.base_account); - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount(unknownAccount.base_account); + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount( + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( unknownAccount.base_vesting_account?.base_account, ); - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount( + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( unknownAccount.base_vesting_account?.base_account, ); - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount( + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( unknownAccount.base_vesting_account?.base_account, ); - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount( + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( unknownAccount.base_vesting_account?.base_account, ); - } else if (unknownAccount instanceof proto.cosmos.auth.v1beta1.ModuleAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount) { if (unknownAccount.base_account === null) { return undefined; } - return new proto.cosmos.auth.v1beta1.BaseAccount(unknownAccount.base_account); + return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount(unknownAccount.base_account); } else { console.error('Unsupported Account!'); console.error(unknownAccount); @@ -118,29 +118,29 @@ export const convertUnknownAccountToBaseAccount = ( export const convertTypedAccountToTypedName = ( unknownAccount: - | proto.cosmos.auth.v1beta1.BaseAccount - | proto.cosmos.vesting.v1beta1.BaseVestingAccount - | proto.cosmos.vesting.v1beta1.ContinuousVestingAccount - | proto.cosmos.vesting.v1beta1.DelayedVestingAccount - | proto.cosmos.vesting.v1beta1.PeriodicVestingAccount - | proto.cosmos.vesting.v1beta1.PermanentLockedAccount - | proto.cosmos.auth.v1beta1.ModuleAccount + | cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount + | cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount + | cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount | null | undefined, ): string | null | undefined => { - if (unknownAccount instanceof proto.cosmos.auth.v1beta1.BaseAccount) { + if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { return 'BaseAccount'; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.BaseVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount) { return 'BaseVestingAccount'; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { return 'ContinuousVestingAccount'; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { return 'DelayedVestingAccount'; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { return 'PeriodicVestingAccount'; - } else if (unknownAccount instanceof proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { return 'PermanentLockedAccount'; - } else if (unknownAccount instanceof proto.cosmos.auth.v1beta1.ModuleAccount) { + } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount) { return 'ModuleAccount'; } else if (unknownAccount === undefined) { return unknownAccount; diff --git a/projects/shared/src/lib/utils/key.ts b/projects/shared/src/lib/utils/key.ts index de60bc0bc..8514a2952 100644 --- a/projects/shared/src/lib/utils/key.ts +++ b/projects/shared/src/lib/utils/key.ts @@ -1,6 +1,6 @@ import { KeyType } from '../models/keys/key.model'; import { convertHexStringToUint8Array, convertUint8ArrayToHexString } from './converter'; -import { cosmosclient, proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { PrivKey, PubKey } from '@cosmos-client/core/esm/types'; export const createPrivateKeyFromMnemonic = async ( @@ -51,9 +51,9 @@ export const createCosmosPrivateKeyFromUint8Array = ( try { switch (keyType) { case KeyType.secp256k1: - return new proto.cosmos.crypto.secp256k1.PrivKey({ key: privateKeyUint8Array }); + return new cosmosclient.proto.cosmos.crypto.secp256k1.PrivKey({ key: privateKeyUint8Array }); case KeyType.ed25519: - return new proto.cosmos.crypto.ed25519.PrivKey({ key: privateKeyUint8Array }); + return new cosmosclient.proto.cosmos.crypto.ed25519.PrivKey({ key: privateKeyUint8Array }); default: return undefined; } @@ -81,9 +81,9 @@ export const createCosmosPublicKeyFromUint8Array = ( try { switch (keyType) { case KeyType.secp256k1: - return new proto.cosmos.crypto.secp256k1.PubKey({ key: publicKeyUint8Array }); + return new cosmosclient.proto.cosmos.crypto.secp256k1.PubKey({ key: publicKeyUint8Array }); case KeyType.ed25519: - return new proto.cosmos.crypto.ed25519.PubKey({ key: publicKeyUint8Array }); + return new cosmosclient.proto.cosmos.crypto.ed25519.PubKey({ key: publicKeyUint8Array }); default: return undefined; } diff --git a/projects/shared/src/lib/utils/validation.ts b/projects/shared/src/lib/utils/validation.ts index 591cd71cd..2cd5486b5 100644 --- a/projects/shared/src/lib/utils/validation.ts +++ b/projects/shared/src/lib/utils/validation.ts @@ -1,6 +1,6 @@ import { StoredWallet } from '../models/wallets/wallet.model'; import { createCosmosPrivateKeyFromString, createCosmosPublicKeyFromString } from './key'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; export const validatePrivateStoredWallet = ( privateStoredWallet: StoredWallet & { privateKey: string }, diff --git a/projects/shared/src/lib/views/dialogs/cosmos/tx/common/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts b/projects/shared/src/lib/views/dialogs/cosmos/tx/common/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts index 66ea7e457..4c187eaf0 100644 --- a/projects/shared/src/lib/views/dialogs/cosmos/tx/common/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts +++ b/projects/shared/src/lib/views/dialogs/cosmos/tx/common/tx-fee-confirm-dialog/tx-fee-confirm-dialog.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; @Component({ selector: 'lib-view-tx-fee-confirm-dialog', @@ -11,13 +11,13 @@ export class TxFeeConfirmDialogComponent implements OnInit { constructor( @Inject(MAT_DIALOG_DATA) public readonly data: { - fee: proto.cosmos.base.v1beta1.ICoin; + fee: cosmosclient.proto.cosmos.base.v1beta1.ICoin; isConfirmed: boolean; }, private readonly dialogRef: MatDialogRef, - ) {} + ) { } - ngOnInit(): void {} + ngOnInit(): void { } okToSendTx(): void { this.data.isConfirmed = true; diff --git a/projects/shared/src/lib/views/dialogs/ununifi/tx/nft/list-nft-form-dialog/list-nft-form-dialog.component.ts b/projects/shared/src/lib/views/dialogs/ununifi/tx/nft/list-nft-form-dialog/list-nft-form-dialog.component.ts index 3ecad4092..b08dfef04 100644 --- a/projects/shared/src/lib/views/dialogs/ununifi/tx/nft/list-nft-form-dialog/list-nft-form-dialog.component.ts +++ b/projects/shared/src/lib/views/dialogs/ununifi/tx/nft/list-nft-form-dialog/list-nft-form-dialog.component.ts @@ -3,7 +3,7 @@ import { Nft } from '../../../../../../models/ununifi/query/nft/nft.model'; import { MsgListNftData } from '../../../../../../models/ununifi/tx/nft/nft-tx.model'; import { StoredWallet } from '../../../../../../models/wallets/wallet.model'; import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { proto } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import * as crypto from 'crypto'; import Long from 'long'; @@ -21,15 +21,15 @@ export class LibViewListNftFormDialogComponent implements OnInit { @Input() nft?: Nft | null; @Input() currentStoredWallet?: StoredWallet | null; - @Input() coins?: proto.cosmos.base.v1beta1.ICoin[] | null; + @Input() coins?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Input() uguuBalance?: string | null; - @Input() minimumGasPrices?: proto.cosmos.base.v1beta1.ICoin[] | null; + @Input() minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; @Output() appSubmit: EventEmitter; - selectedGasPrice?: proto.cosmos.base.v1beta1.ICoin; + selectedGasPrice?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; availableDenoms?: string[]; - selectedAmount?: proto.cosmos.base.v1beta1.ICoin; + selectedAmount?: cosmosclient.proto.cosmos.base.v1beta1.ICoin; gasRatio: number; listingType: string; @@ -54,7 +54,7 @@ export class LibViewListNftFormDialogComponent implements OnInit { } } - ngOnInit(): void {} + ngOnInit(): void { } getColorCode(address: string) { const hash = crypto diff --git a/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-create-wallet-form-dialog/ununifi-create-wallet-form-dialog.component.ts b/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-create-wallet-form-dialog/ununifi-create-wallet-form-dialog.component.ts index 448a2883e..4ae0eb8cb 100644 --- a/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-create-wallet-form-dialog/ununifi-create-wallet-form-dialog.component.ts +++ b/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-create-wallet-form-dialog/ununifi-create-wallet-form-dialog.component.ts @@ -9,7 +9,7 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { Component, OnInit } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import * as bip39 from 'bip39'; @Component({ @@ -56,7 +56,7 @@ export class UnunifiCreateWalletFormDialogComponent implements OnInit { }); } - ngOnInit(): void {} + ngOnInit(): void { } togglePasswordVisibility() { this.isPasswordVisible = !this.isPasswordVisible; diff --git a/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-mnemonic-form-dialog/ununifi-import-wallet-with-mnemonic-form-dialog.component.ts b/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-mnemonic-form-dialog/ununifi-import-wallet-with-mnemonic-form-dialog.component.ts index badda72a2..4e5531f3f 100644 --- a/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-mnemonic-form-dialog/ununifi-import-wallet-with-mnemonic-form-dialog.component.ts +++ b/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-mnemonic-form-dialog/ununifi-import-wallet-with-mnemonic-form-dialog.component.ts @@ -10,7 +10,7 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { Component, OnInit } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { BehaviorSubject, combineLatest, Observable, of } from 'rxjs'; import { mergeMap } from 'rxjs/operators'; @@ -99,7 +99,7 @@ export class UnunifiImportWalletWithMnemonicFormDialogComponent implements OnIni ); } - ngOnInit(): void {} + ngOnInit(): void { } togglePasswordVisibility() { this.isPasswordVisible = !this.isPasswordVisible; diff --git a/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-private-key-form-dialog/ununifi-import-wallet-with-private-key-form-dialog.component.ts b/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-private-key-form-dialog/ununifi-import-wallet-with-private-key-form-dialog.component.ts index e73f67583..5cb61d279 100644 --- a/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-private-key-form-dialog/ununifi-import-wallet-with-private-key-form-dialog.component.ts +++ b/projects/shared/src/lib/views/dialogs/wallets/ununifi/ununifi-import-wallet-with-private-key-form-dialog/ununifi-import-wallet-with-private-key-form-dialog.component.ts @@ -6,7 +6,7 @@ import { Clipboard } from '@angular/cdk/clipboard'; import { Component, OnInit } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { BehaviorSubject, combineLatest, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @@ -86,7 +86,7 @@ export class UnunifiImportWalletWithPrivateKeyFormDialogComponent implements OnI ); } - ngOnInit(): void {} + ngOnInit(): void { } togglePasswordVisibility() { this.isPasswordVisible = !this.isPasswordVisible; diff --git a/projects/shared/src/lib/widgets/dialogs/ununifi/tx/list-nft-form-dialog/list-nft-form-dialog.component.ts b/projects/shared/src/lib/widgets/dialogs/ununifi/tx/list-nft-form-dialog/list-nft-form-dialog.component.ts index bd8289b53..3f138ec30 100644 --- a/projects/shared/src/lib/widgets/dialogs/ununifi/tx/list-nft-form-dialog/list-nft-form-dialog.component.ts +++ b/projects/shared/src/lib/widgets/dialogs/ununifi/tx/list-nft-form-dialog/list-nft-form-dialog.component.ts @@ -8,7 +8,7 @@ import { MsgListNftFormData } from '../../../../../views/dialogs/ununifi/tx/nft/ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable } from 'rxjs'; import { filter, map, mergeMap } from 'rxjs/operators'; @@ -21,9 +21,9 @@ export class LibWidgetListNftFormDialogComponent implements OnInit { nft: Nft; currentStoredWallet$: Observable; - coins$: Observable; + coins$: Observable; uguuBalance$: Observable | undefined; - minimumGasPrices$: Observable; + minimumGasPrices$: Observable; constructor( @Inject(MAT_DIALOG_DATA) @@ -44,7 +44,7 @@ export class LibWidgetListNftFormDialogComponent implements OnInit { map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => rest.bank.allBalances(sdk.rest, address)), + mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), map((result) => result.data.balances), ); this.uguuBalance$ = this.coins$.pipe( @@ -56,7 +56,7 @@ export class LibWidgetListNftFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void {} + ngOnInit(): void { } async onSubmit($event: MsgListNftFormData): Promise { let txHash: string | undefined; From 291a78d6a8746a3888863ce74018e9e2ca632e5c Mon Sep 17 00:00:00 2001 From: taro04 Date: Thu, 30 Jun 2022 21:45:57 +0900 Subject: [PATCH 25/77] feat: update ununifi-client --- package-lock.json | 30 ++++++++-------- package.json | 4 +-- .../auction.infrastructure.service.ts | 11 +++--- .../models/cdps/cdp.infrastructure.service.ts | 34 +++++++++++++++---- .../app/pages/auction/auction.component.ts | 4 +-- .../auctions/auction/auction.component.ts | 12 +++---- .../auction/place-bid/place-bid.component.ts | 12 +++---- .../auction/auctions/auctions.component.ts | 14 ++++---- .../app/pages/mint/cdps/cdp/cdp.component.ts | 14 ++++---- .../mint/cdps/cdp/clear/clear.component.ts | 8 ++--- .../cdps/cdp/deposit/deposit.component.ts | 6 ++-- .../mint/cdps/cdp/issue/issue.component.ts | 10 +++--- .../cdps/cdp/withdraw/withdraw.component.ts | 10 +++--- .../src/app/pages/mint/cdps/cdps.component.ts | 6 ++-- .../mint/cdps/create/create.component.ts | 14 ++++---- .../src/app/pages/mint/mint.component.ts | 12 +++---- projects/portal/src/app/utils/function.ts | 14 ++++---- projects/portal/src/app/utils/stream.ts | 14 ++++---- .../auctions/auction/auction.component.ts | 8 ++--- .../auction/place-bid/place-bid.component.ts | 4 +-- .../auction/auctions/auctions.component.ts | 6 ++-- .../app/views/mint/cdps/cdp/cdp.component.ts | 10 +++--- .../mint/cdps/create/create.component.ts | 8 ++--- .../src/app/views/mint/mint.component.ts | 10 +++--- 24 files changed, 149 insertions(+), 126 deletions(-) diff --git a/package-lock.json b/package-lock.json index 558f7ab7e..7921bc86a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.46.0-rc5", + "@cosmos-client/core": "^0.46.0-rc7", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -47,7 +47,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.3.0", - "ununifi-client": "^0.46.0-rc2", + "ununifi-client": "^0.46.0-rc3", "zone.js": "~0.11.4" }, "devDependencies": { @@ -3180,9 +3180,9 @@ "dev": true }, "node_modules/@cosmos-client/core": { - "version": "0.46.0-rc5", - "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc5.tgz", - "integrity": "sha512-q9Y8iMZGwdVJnFORfs1EXwPbi6SpPE712IEgDqczNYNVVwhTkYTqqosPVQl29eQLCY7lTAxlCNRyRW3b8ZR3yw==", + "version": "0.46.0-rc7", + "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc7.tgz", + "integrity": "sha512-tfBM/H4FP1fdOM74+vEeKRvAPLtncTZcHknw8IH1/j2ptcrYtEstjF649OYR66wnrCC2ev/wISpi/S3ltmSoBQ==", "dependencies": { "axios": "^0.23.0", "bech32": "^1.1.4", @@ -40495,15 +40495,15 @@ } }, "node_modules/ununifi-client": { - "version": "0.46.0-rc2", - "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.46.0-rc2.tgz", - "integrity": "sha512-zo4rvV6kWjQCCpnn3O48Tg7lFJway/u4HRj5XTt77NI0SrM5v91to/m38Ae2Zz3G16lJaEyuVKoK9F2sRf+NqA==", + "version": "0.46.0-rc3", + "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.46.0-rc3.tgz", + "integrity": "sha512-I5uWPrKAblK0fPinwIR2xFkKcsuKXFR6tmBz3UHqR9fJOa4bobN8J3zdClMCmEDt3p5RADDOTt50IIGxWeYVIg==", "dependencies": { "axios": "^0.21.1", "protobufjs": "^6.11.2" }, "peerDependencies": { - "@cosmos-client/core": "^0.46.0-rc2" + "@cosmos-client/core": "^0.46.0-rc7" } }, "node_modules/ununifi-client/node_modules/axios": { @@ -44381,9 +44381,9 @@ "dev": true }, "@cosmos-client/core": { - "version": "0.46.0-rc5", - "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc5.tgz", - "integrity": "sha512-q9Y8iMZGwdVJnFORfs1EXwPbi6SpPE712IEgDqczNYNVVwhTkYTqqosPVQl29eQLCY7lTAxlCNRyRW3b8ZR3yw==", + "version": "0.46.0-rc7", + "resolved": "https://registry.npmjs.org/@cosmos-client/core/-/core-0.46.0-rc7.tgz", + "integrity": "sha512-tfBM/H4FP1fdOM74+vEeKRvAPLtncTZcHknw8IH1/j2ptcrYtEstjF649OYR66wnrCC2ev/wISpi/S3ltmSoBQ==", "requires": { "axios": "^0.23.0", "bech32": "^1.1.4", @@ -73371,9 +73371,9 @@ "dev": true }, "ununifi-client": { - "version": "0.46.0-rc2", - "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.46.0-rc2.tgz", - "integrity": "sha512-zo4rvV6kWjQCCpnn3O48Tg7lFJway/u4HRj5XTt77NI0SrM5v91to/m38Ae2Zz3G16lJaEyuVKoK9F2sRf+NqA==", + "version": "0.46.0-rc3", + "resolved": "https://registry.npmjs.org/ununifi-client/-/ununifi-client-0.46.0-rc3.tgz", + "integrity": "sha512-I5uWPrKAblK0fPinwIR2xFkKcsuKXFR6tmBz3UHqR9fJOa4bobN8J3zdClMCmEDt3p5RADDOTt50IIGxWeYVIg==", "requires": { "axios": "^0.21.1", "protobufjs": "^6.11.2" diff --git a/package.json b/package.json index c703f9e63..e262e5ec7 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.46.0-rc5", + "@cosmos-client/core": "^0.46.0-rc7", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -78,7 +78,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.3.0", - "ununifi-client": "^0.46.0-rc2", + "ununifi-client": "^0.46.0-rc3", "zone.js": "~0.11.4" }, "devDependencies": { diff --git a/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts b/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts index b56ccf261..377dc1ec4 100644 --- a/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts +++ b/projects/portal/src/app/models/auctions/auction.infrastructure.service.ts @@ -6,7 +6,7 @@ import { Injectable } from '@angular/core'; import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; -import { ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; @Injectable({ providedIn: 'root', @@ -100,12 +100,15 @@ export class AuctionInfrastructureService implements IAuctionInfrastructure { auctionID: number, bidder: string, amount: cosmosclient.proto.cosmos.base.v1beta1.ICoin, - ): ununifi.auction.MsgPlaceBid { - const msgPlaceBid = new ununifi.auction.MsgPlaceBid({ + ): ununifi.proto.ununifi.auction.MsgPlaceBid { + //Todo: make auction.MsgPlaceBid + const msgPlaceBid: any = undefined + /* + const msgPlaceBid = new ununifi.rest.auction.MsgPlaceBid({ auction_id: Long.fromNumber(auctionID), bidder: bidder, amount: amount, - }); + }); */ return msgPlaceBid; } } diff --git a/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts b/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts index 62be0b15f..89cfea67d 100644 --- a/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts +++ b/projects/portal/src/app/models/cdps/cdp.infrastructure.service.ts @@ -9,7 +9,7 @@ import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050 } from '@cosmos-client/core/esm/openapi'; import Long from 'long'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; -import { ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; @Injectable({ providedIn: 'root', @@ -102,12 +102,16 @@ export class CdpInfrastructureService implements ICdpInfrastructure { } // build tx - const msgCreateCdp = new ununifi.cdp.MsgCreateCdp({ + //Todo: make cdp.MsgCreateCdp + const msgCreateCdp: any = undefined + /* + const msgCreateCdp = new ununifi.rest.cdp.MsgCreateCdp({ sender: sender.toString(), collateral, principal, collateral_type: collateralType, }); + */ const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgCreateCdp)], @@ -213,11 +217,15 @@ export class CdpInfrastructureService implements ICdpInfrastructure { throw Error('Unused Account or Unsupported Account Type!'); } - const msgDrawDebt = new ununifi.cdp.MsgDrawDebt({ + //Todo: make cdp.msgDrawDebt + const msgDrawDebt: any = undefined + /* + const msgDrawDebt = new ununifi.rest.cdp.MsgDrawDebt({ sender: sender.toString(), collateral_type: collateralType, principal, - }); + }); + */ const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgDrawDebt)], @@ -323,11 +331,15 @@ export class CdpInfrastructureService implements ICdpInfrastructure { throw Error('Unused Account or Unsupported Account Type!'); } - const msgRepayDebt = new ununifi.cdp.MsgRepayDebt({ + // Todo: make cdp.MsgRepayDebt + const msgRepayDebt: any = undefined + /* + const msgRepayDebt = new ununifi.rest.cdp.MsgRepayDebt({ sender: sender.toString(), collateral_type: collateralType, payment: repayment, }); + */ const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgRepayDebt)], @@ -439,12 +451,16 @@ export class CdpInfrastructureService implements ICdpInfrastructure { } // build tx - const msgDepositCDP = new ununifi.cdp.MsgDeposit({ + // Todo: make cdp.MsgDeposit + const msgDepositCDP: any = undefined + /* + const msgDepositCDP = new ununifi.rest.cdp.MsgDeposit({ depositor: sender.toString(), owner: ownerAddr.toString(), collateral, collateral_type: collateralType, }); + */ const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgDepositCDP)], @@ -556,12 +572,16 @@ export class CdpInfrastructureService implements ICdpInfrastructure { } // build tx - const msgWithdraw = new ununifi.cdp.MsgWithdraw({ + //To do: make cdp.MsgWithdraw + const msgWithdraw: any = undefined + /* + const msgWithdraw = new ununifi.rest.cdp.MsgWithdraw({ depositor: sender.toString(), owner: ownerAddr.toString(), collateral, collateral_type: collateralType, }); + */ const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ messages: [cosmosclient.codec.instanceToProtoAny(msgWithdraw)], diff --git a/projects/portal/src/app/pages/auction/auction.component.ts b/projects/portal/src/app/pages/auction/auction.component.ts index fe26a9e14..598b5bb62 100644 --- a/projects/portal/src/app/pages/auction/auction.component.ts +++ b/projects/portal/src/app/pages/auction/auction.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { combineLatest, Observable, timer } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; -import cosmosclient from 'ununifi-client'; +import ununifi from 'ununifi-client'; import { InlineResponse2002Params } from 'ununifi-client/esm/openapi'; @Component({ @@ -16,7 +16,7 @@ export class AuctionComponent implements OnInit { const timer$ = timer(0, 60 * 1000); this.params$ = combineLatest([this.cosmosSDK.sdk$, timer$]).pipe( - mergeMap(([sdk, _]) => cosmosclient.rest.ununifi.auction.params(sdk.rest)), + mergeMap(([sdk, _]) => ununifi.rest.auction.params(sdk.rest)), map((res) => res.data.params!), ); } diff --git a/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts b/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts index f8331084c..952edb77d 100644 --- a/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts @@ -4,7 +4,7 @@ import cosmosclient from '@cosmos-client/core'; import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; -import { ununifi, google, rest } from 'ununifi-client'; +import ununifi from 'ununifi-client'; @Component({ selector: 'app-auction', @@ -13,7 +13,7 @@ import { ununifi, google, rest } from 'ununifi-client'; }) export class AuctionComponent implements OnInit { auctionID$: Observable; - auction$: Observable; + auction$: Observable; endTime$: Observable; maxEndTime$: Observable; @@ -21,18 +21,18 @@ export class AuctionComponent implements OnInit { this.auctionID$ = this.route.params.pipe(map((params) => params.auction_id)); this.auction$ = combineLatest([this.cosmosSDK.sdk$, this.auctionID$]).pipe( mergeMap(([sdk, id]) => - rest.ununifi.auction.auction(sdk.rest, id).then((res) => res.data.auction), + ununifi.rest.auction.auction(sdk.rest, id).then((res) => res.data.auction), ), map((auction) => { const anyAuction = auction as { base_auction: { end_time: string; max_end_time: string }; }; const parseAuction = (anyAuction: any): { type_url?: string; value?: string } => { - anyAuction.base_auction.end_time = google.protobuf.Timestamp.fromObject({ + anyAuction.base_auction.end_time = ununifi.proto.google.protobuf.Timestamp.fromObject({ seconds: Date.parse(anyAuction.base_auction.end_time), nanos: 0, }); - anyAuction.base_auction.max_end_time = google.protobuf.Timestamp.fromObject({ + anyAuction.base_auction.max_end_time = ununifi.proto.google.protobuf.Timestamp.fromObject({ seconds: Date.parse(anyAuction.base_auction.max_end_time), nanos: 0, }); @@ -41,7 +41,7 @@ export class AuctionComponent implements OnInit { const unpackAuction = cosmosclient.codec.protoJSONToInstance( cosmosclient.codec.castProtoJSONOfProtoAny(parseAuction(anyAuction)), ); - if (!(unpackAuction instanceof ununifi.auction.CollateralAuction)) { + if (!(unpackAuction instanceof ununifi.proto.ununifi.auction.CollateralAuction)) { return; } return unpackAuction; diff --git a/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts b/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts index ecc89520b..61e56c39a 100644 --- a/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts @@ -9,7 +9,7 @@ import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.s import { PlaceBidOnSubmitEvent } from 'projects/portal/src/app/views/auction/auctions/auction/place-bid/place-bid.component'; import { combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; -import { ununifi, google, rest } from 'ununifi-client'; +import ununifi from 'ununifi-client'; @Component({ selector: 'app-place-bid', @@ -19,7 +19,7 @@ import { ununifi, google, rest } from 'ununifi-client'; export class PlaceBidComponent implements OnInit { key$: Observable; auctionID$: Observable; - auction$: Observable; + auction$: Observable; endTime$: Observable; maxEndTime$: Observable; minimumGasPrices$: Observable; @@ -35,18 +35,18 @@ export class PlaceBidComponent implements OnInit { this.auctionID$ = this.route.params.pipe(map((params) => params.auction_id)); this.auction$ = combineLatest([this.cosmosSDK.sdk$, this.auctionID$]).pipe( mergeMap(([sdk, id]) => - rest.ununifi.auction.auction(sdk.rest, id).then((res) => res.data.auction), + ununifi.rest.auction.auction(sdk.rest, id).then((res) => res.data.auction), ), map((auction) => { const anyAuction = auction as { base_auction: { end_time: string; max_end_time: string }; }; const parseAuction = (anyAuction: any): { type_url?: string; value?: string } => { - anyAuction.base_auction.end_time = google.protobuf.Timestamp.fromObject({ + anyAuction.base_auction.end_time = ununifi.proto.google.protobuf.Timestamp.fromObject({ seconds: Date.parse(anyAuction.base_auction.end_time), nanos: 0, }); - anyAuction.base_auction.max_end_time = google.protobuf.Timestamp.fromObject({ + anyAuction.base_auction.max_end_time = ununifi.proto.google.protobuf.Timestamp.fromObject({ seconds: Date.parse(anyAuction.base_auction.max_end_time), nanos: 0, }); @@ -55,7 +55,7 @@ export class PlaceBidComponent implements OnInit { const unpackAuction = cosmosclient.codec.protoJSONToInstance( cosmosclient.codec.castProtoJSONOfProtoAny(parseAuction(anyAuction)), ); - if (!(unpackAuction instanceof ununifi.auction.CollateralAuction)) { + if (!(unpackAuction instanceof ununifi.proto.ununifi.auction.CollateralAuction)) { return; } return unpackAuction; diff --git a/projects/portal/src/app/pages/auction/auctions/auctions.component.ts b/projects/portal/src/app/pages/auction/auctions/auctions.component.ts index 8d8ed6cdb..79ccbe6bd 100644 --- a/projects/portal/src/app/pages/auction/auctions/auctions.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auctions.component.ts @@ -4,7 +4,7 @@ import { PageEvent } from '@angular/material/paginator'; import cosmosclient from '@cosmos-client/core'; import { BehaviorSubject, combineLatest, Observable, of, timer } from 'rxjs'; import { filter, map, mergeMap, switchMap } from 'rxjs/operators'; -import { rest, ununifi, google } from 'ununifi-client'; +import ununifi from 'ununifi-client'; @Component({ selector: 'app-auctions', @@ -21,7 +21,7 @@ export class AuctionsComponent implements OnInit { auctionsPageOffset$: Observable; pollingInterval = 30; - auctions$?: Observable<(ununifi.auction.CollateralAuction | undefined)[] | undefined>; + auctions$?: Observable<(ununifi.proto.ununifi.auction.CollateralAuction | undefined)[] | undefined>; constructor(private cosmosSDK: CosmosSDKService) { const timer$ = timer(0, this.pollingInterval * 1000); @@ -29,7 +29,7 @@ export class AuctionsComponent implements OnInit { this.auctionsTotalCount$ = combineLatest([sdk$, this.pageNumber$, this.pageSize$]).pipe( switchMap(([sdk, _pageNumber, _pageSize]) => { - return rest.ununifi.auction + return ununifi.rest.auction .allAuctions(sdk.rest, undefined, undefined, undefined, true) .then((res) => res.data.pagination?.total ? BigInt(res.data.pagination?.total) : BigInt(0), @@ -73,7 +73,7 @@ export class AuctionsComponent implements OnInit { return []; } - return rest.ununifi.auction + return ununifi.rest.auction .allAuctions(sdk.rest, undefined, modifiedPageOffset, modifiedPageSize, true) .then((res) => { return res.data.auctions; @@ -89,11 +89,11 @@ export class AuctionsComponent implements OnInit { base_auction: { end_time: string; max_end_time: string }; }; const parseAuction = (anyAuction: any): { type_url?: string; value?: string } => { - anyAuction.base_auction.end_time = google.protobuf.Timestamp.fromObject({ + anyAuction.base_auction.end_time = ununifi.proto.google.protobuf.Timestamp.fromObject({ seconds: Date.parse(anyAuction.base_auction.end_time), nanos: 0, }); - anyAuction.base_auction.max_end_time = google.protobuf.Timestamp.fromObject({ + anyAuction.base_auction.max_end_time = ununifi.proto.google.protobuf.Timestamp.fromObject({ seconds: Date.parse(anyAuction.base_auction.max_end_time), nanos: 0, }); @@ -102,7 +102,7 @@ export class AuctionsComponent implements OnInit { const unpackValue = cosmosclient.codec.protoJSONToInstance( cosmosclient.codec.castProtoJSONOfProtoAny(parseAuction(anyAuction)), ); - if (!(unpackValue instanceof ununifi.auction.CollateralAuction)) { + if (!(unpackValue instanceof ununifi.proto.ununifi.auction.CollateralAuction)) { console.log(unpackValue); return; } diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts index 6cf6a9f0d..c67dfeb8c 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts @@ -6,7 +6,7 @@ import cosmosclient from '@cosmos-client/core'; import { CosmosSDKService } from 'projects/portal/src/app/models/index'; import { combineLatest, Observable, zip } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; -import { rest, ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1, InlineResponse2006Deposits } from 'ununifi-client/esm/openapi'; @Component({ @@ -18,12 +18,12 @@ export class CdpComponent implements OnInit { owner$: Observable; collateralType$: Observable; denom$: Observable; - params$: Observable; + params$: Observable; cdp$: Observable; deposits$: Observable; - spotPrice$: Observable; - liquidationPrice$: Observable; + spotPrice$: Observable; + liquidationPrice$: Observable; withdrawLimit$: Observable; issueLimit$: Observable; @@ -34,7 +34,7 @@ export class CdpComponent implements OnInit { this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); this.params$ = this.cosmosSdk.sdk$.pipe( - mergeMap((sdk) => rest.ununifi.cdp.params(sdk.rest)), + mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), map((data) => data.data.params!), ); this.denom$ = combineLatest([this.collateralType$, this.params$]).pipe( @@ -53,7 +53,7 @@ export class CdpComponent implements OnInit { this.cdp$ = ownerAndCollateralType$.pipe( mergeMap(([ownerAddr, collateralType, sdk]) => - rest.ununifi.cdp.cdp( + ununifi.rest.cdp.cdp( sdk.rest, cosmosclient.AccAddress.fromString(ownerAddr), collateralType, @@ -64,7 +64,7 @@ export class CdpComponent implements OnInit { this.deposits$ = ownerAndCollateralType$.pipe( mergeMap(([ownerAddr, collateralType, sdk]) => - rest.ununifi.cdp + ununifi.rest.cdp .allDeposits(sdk.rest, cosmosclient.AccAddress.fromString(ownerAddr), collateralType) .catch((error) => { console.error(error); diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts index 6e165332f..1673c22da 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts @@ -9,7 +9,7 @@ import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.s import { ClearCdpOnSubmitEvent } from 'projects/portal/src/app/views/mint/cdps/cdp/clear/clear.component'; import { timer, of, combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; -import { rest, ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @Component({ @@ -21,7 +21,7 @@ export class ClearComponent implements OnInit { key$: Observable; owner$: Observable; collateralType$: Observable; - params$: Observable; + params$: Observable; repaymentDenomString$: Observable; repaymentDenom$: Observable; @@ -68,13 +68,13 @@ export class ClearComponent implements OnInit { ); this.params$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.ununifi.cdp.params(sdk.rest)), + mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), map((data) => data.data.params!), ); this.cdp$ = combineLatest([this.owner$, this.collateralType$, this.cosmosSDK.sdk$]).pipe( mergeMap(([ownerAddr, collateralType, sdk]) => - rest.ununifi.cdp.cdp( + ununifi.rest.cdp.cdp( sdk.rest, cosmosclient.AccAddress.fromString(ownerAddr), collateralType, diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts index f0b91e0d4..d4ae6f88c 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts @@ -9,7 +9,7 @@ import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.s import { DepositCdpOnSubmitEvent } from 'projects/portal/src/app/views/mint/cdps/cdp/deposit/deposit.component'; import { timer, of, combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; -import { rest, ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; @Component({ selector: 'app-deposit', @@ -20,7 +20,7 @@ export class DepositComponent implements OnInit { key$: Observable; owner$: Observable; collateralType$: Observable; - params$: Observable; + params$: Observable; denom$: Observable; address$: Observable; balances$: Observable; @@ -38,7 +38,7 @@ export class DepositComponent implements OnInit { this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); this.params$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.ununifi.cdp.params(sdk.rest)), + mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), map((data) => data.data.params!), ); diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts index 4276a5758..7c4eb75f0 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts @@ -11,7 +11,7 @@ import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.s import { IssueCdpOnSubmitEvent } from 'projects/portal/src/app/views/mint/cdps/cdp/issue/issue.component'; import { timer, of, zip, combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; -import { rest, ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @Component({ @@ -23,12 +23,12 @@ export class IssueComponent implements OnInit { key$: Observable; owner$: Observable; collateralType$: Observable; - params$: Observable; + params$: Observable; principalDenom$: Observable; minimumGasPrices$: Observable; cdp$: Observable; - liquidationPrice$: Observable; + liquidationPrice$: Observable; issueLimit$: Observable; address$: Observable; @@ -46,7 +46,7 @@ export class IssueComponent implements OnInit { this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); this.params$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.ununifi.cdp.params(sdk.rest)), + mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), map((data) => data.data.params!), ); @@ -76,7 +76,7 @@ export class IssueComponent implements OnInit { this.cdp$ = combineLatest([this.owner$, this.collateralType$, this.cosmosSDK.sdk$]).pipe( mergeMap(([ownerAddr, collateralType, sdk]) => - rest.ununifi.cdp.cdp( + ununifi.rest.cdp.cdp( sdk.rest, cosmosclient.AccAddress.fromString(ownerAddr), collateralType, diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts index b3808dd9e..5df7c1a10 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts @@ -11,7 +11,7 @@ import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.s import { WithdrawCdpOnSubmitEvent } from 'projects/portal/src/app/views/mint/cdps/cdp/withdraw/withdraw.component'; import { timer, of, zip, combineLatest, Observable } from 'rxjs'; import { mergeMap, map } from 'rxjs/operators'; -import { rest, ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @Component({ @@ -23,11 +23,11 @@ export class WithdrawComponent implements OnInit { key$: Observable; owner$: Observable; collateralType$: Observable; - params$: Observable; + params$: Observable; denom$: Observable; cdp$: Observable; - spotPrice$: Observable; + spotPrice$: Observable; withdrawLimit$: Observable; address$: Observable; @@ -46,7 +46,7 @@ export class WithdrawComponent implements OnInit { this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); this.params$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.ununifi.cdp.params(sdk.rest)), + mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), map((data) => data.data.params!), ); this.denom$ = combineLatest([this.collateralType$, this.params$]).pipe( @@ -84,7 +84,7 @@ export class WithdrawComponent implements OnInit { this.cdp$ = combineLatest([this.owner$, this.collateralType$, this.cosmosSDK.sdk$]).pipe( mergeMap(([ownerAddr, collateralType, sdk]) => - rest.ununifi.cdp.cdp( + ununifi.rest.cdp.cdp( sdk.rest, cosmosclient.AccAddress.fromString(ownerAddr), collateralType, diff --git a/projects/portal/src/app/pages/mint/cdps/cdps.component.ts b/projects/portal/src/app/pages/mint/cdps/cdps.component.ts index 69cd9d250..63d65f013 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdps.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdps.component.ts @@ -5,7 +5,7 @@ import { Component, OnInit } from '@angular/core'; import cosmosclient from '@cosmos-client/core'; import { combineLatest, Observable, of } from 'rxjs'; import { catchError, filter, map, mergeMap } from 'rxjs/operators'; -import { rest } from 'ununifi-client'; +import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @Component({ @@ -30,14 +30,14 @@ export class CdpsComponent implements OnInit { ); const collateralTypes$ = this.cosmosSdk.sdk$.pipe( - mergeMap((sdk) => rest.ununifi.cdp.params(sdk.rest)), + mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), map((res) => res.data?.params?.collateral_params?.map((p) => p.type!) || []), ); this.cdps$ = combineLatest([address$, collateralTypes$, this.cosmosSdk.sdk$]).pipe( mergeMap(([address, collateralTypes, sdk]) => Promise.all( collateralTypes.map((collateralType) => - rest.ununifi.cdp.cdp(sdk.rest, address, collateralType).catch((err) => { + ununifi.rest.cdp.cdp(sdk.rest, address, collateralType).catch((err) => { console.log(err); return; }), diff --git a/projects/portal/src/app/pages/mint/cdps/create/create.component.ts b/projects/portal/src/app/pages/mint/cdps/create/create.component.ts index 0ec7a4e91..7c1ebd912 100644 --- a/projects/portal/src/app/pages/mint/cdps/create/create.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/create/create.component.ts @@ -10,7 +10,7 @@ import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.service'; import { timer, of, combineLatest, BehaviorSubject, Observable, Subject } from 'rxjs'; import { filter, map, mergeMap } from 'rxjs/operators'; -import { ununifi, rest } from 'ununifi-client'; +import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @Component({ @@ -20,11 +20,11 @@ import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; }) export class CreateComponent implements OnInit { key$: Observable; - cdpParams$: Observable; - collateralParams$: Observable; + cdpParams$: Observable; + collateralParams$: Observable; selectedCollateralTypeSubject: Subject; selectedCollateralType$: Observable; - selectedCollateralParam$: Observable; + selectedCollateralParam$: Observable; minimumGasPrices$: Observable; address$: Observable; @@ -35,7 +35,7 @@ export class CreateComponent implements OnInit { collateralLimit$: Observable; collateralInputValue: BehaviorSubject = new BehaviorSubject(0); - liquidationPrice$: Observable; + liquidationPrice$: Observable; principalLimit$: Observable; cdp$: Observable; @@ -49,7 +49,7 @@ export class CreateComponent implements OnInit { ) { this.key$ = this.keyStore.currentKey$.asObservable(); this.cdpParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => rest.ununifi.cdp.params(sdk.rest)), + mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), map((param) => param.data.params!), ); this.collateralParams$ = this.cdpParams$.pipe(map((cdpParams) => cdpParams?.collateral_params)); @@ -136,7 +136,7 @@ export class CreateComponent implements OnInit { // check cdp this.cdp$ = combineLatest([this.address$, this.collateralType$, this.cosmosSDK.sdk$]).pipe( mergeMap(([ownerAddr, collateralType, sdk]) => - rest.ununifi.cdp.cdp(sdk.rest, ownerAddr, collateralType).catch((err) => { + ununifi.rest.cdp.cdp(sdk.rest, ownerAddr, collateralType).catch((err) => { console.error(err); return; }), diff --git a/projects/portal/src/app/pages/mint/mint.component.ts b/projects/portal/src/app/pages/mint/mint.component.ts index d36530e10..66848db81 100644 --- a/projects/portal/src/app/pages/mint/mint.component.ts +++ b/projects/portal/src/app/pages/mint/mint.component.ts @@ -2,7 +2,7 @@ import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { combineLatest, Observable, timer } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; -import { ununifi, rest } from 'ununifi-client'; +import ununifi from 'ununifi-client'; @Component({ selector: 'app-mint', @@ -10,20 +10,20 @@ import { ununifi, rest } from 'ununifi-client'; styleUrls: ['./mint.component.css'], }) export class MintComponent implements OnInit { - cdpParams$: Observable; - collateralParams$: Observable; - debtParams$: Observable; + cdpParams$: Observable; + collateralParams$: Observable; + debtParams$: Observable; constructor(private cosmosSDK: CosmosSDKService) { const timer$ = timer(0, 60 * 1000); this.cdpParams$ = combineLatest([this.cosmosSDK.sdk$, timer$]).pipe( - mergeMap(([sdk, _]) => rest.ununifi.cdp.params(sdk.rest)), + mergeMap(([sdk, _]) => ununifi.rest.cdp.params(sdk.rest)), map((res) => res.data.params!), ); this.collateralParams$ = this.cdpParams$.pipe(map((cdpParams) => cdpParams?.collateral_params)); this.debtParams$ = this.cdpParams$.pipe(map((cdpParams) => cdpParams?.debt_params)); } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/utils/function.ts b/projects/portal/src/app/utils/function.ts index 8cac325ff..c465ae954 100644 --- a/projects/portal/src/app/utils/function.ts +++ b/projects/portal/src/app/utils/function.ts @@ -1,10 +1,10 @@ -import { ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp } from 'ununifi-client/esm/openapi'; export const getWithdrawLimit = ( cdp: InlineResponse2004Cdp, - cdpParams: ununifi.cdp.IParams, - spotPrice: ununifi.pricefeed.ICurrentPrice, + cdpParams: ununifi.proto.ununifi.cdp.IParams, + spotPrice: ununifi.proto.ununifi.pricefeed.ICurrentPrice, ) => { const collateralType = cdp.type; const currentCollateralAmount = Number.parseInt(cdp.collateral?.amount!); @@ -35,8 +35,8 @@ export const getWithdrawLimit = ( export const getIssueLimit = ( cdp: InlineResponse2004Cdp, - cdpParams: ununifi.cdp.IParams, - liquidationPrice: ununifi.pricefeed.ICurrentPrice, + cdpParams: ununifi.proto.ununifi.cdp.IParams, + liquidationPrice: ununifi.proto.ununifi.pricefeed.ICurrentPrice, ) => { const currentCollateralAmount = Number.parseInt(cdp.collateral?.amount!); const currentPrincipalAmount = Number.parseInt(cdp.principal?.amount!); @@ -69,10 +69,10 @@ export const getIssueLimit = ( }; export const getCreateLimit = ( - cdpParams: ununifi.cdp.IParams, + cdpParams: ununifi.proto.ununifi.cdp.IParams, InputCollateralAmount: number, selectedCollateralType: string, - liquidationPrice: ununifi.pricefeed.ICurrentPrice, + liquidationPrice: ununifi.proto.ununifi.pricefeed.ICurrentPrice, ) => { const collateralParams = cdpParams.collateral_params?.find( (param) => param.type === selectedCollateralType, diff --git a/projects/portal/src/app/utils/stream.ts b/projects/portal/src/app/utils/stream.ts index cb48d5b72..4ccbbbac2 100644 --- a/projects/portal/src/app/utils/stream.ts +++ b/projects/portal/src/app/utils/stream.ts @@ -1,18 +1,18 @@ import cosmosclient from '@cosmos-client/core'; import { Observable, zip } from 'rxjs'; import { map, mergeMap, filter } from 'rxjs/operators'; -import { ununifi, rest } from 'ununifi-client'; +import ununifi from 'ununifi-client'; const getCollateralParamsStream = ( collateralType: Observable, - cdpParams: Observable, + cdpParams: Observable, ) => zip(collateralType, cdpParams).pipe( map(([collateralType, params]) => { return params.collateral_params?.find((param) => param.type === collateralType); }), filter( - (collateralParams): collateralParams is ununifi.cdp.CollateralParam => + (collateralParams): collateralParams is ununifi.proto.ununifi.cdp.CollateralParam => collateralParams !== undefined, ), ); @@ -20,11 +20,11 @@ const getCollateralParamsStream = ( export const getSpotPriceStream = ( sdk: cosmosclient.CosmosSDK, collateralType: Observable, - cdpParams: Observable, + cdpParams: Observable, ) => { return getCollateralParamsStream(collateralType, cdpParams).pipe( mergeMap((collateralParams) => - rest.ununifi.pricefeed.price(sdk, collateralParams.spot_market_id), + ununifi.rest.pricefeed.price(sdk, collateralParams.spot_market_id), ), map((res) => res.data.price!), ); @@ -33,11 +33,11 @@ export const getSpotPriceStream = ( export const getLiquidationPriceStream = ( sdk: cosmosclient.CosmosSDK, collateralType: Observable, - cdpParams: Observable, + cdpParams: Observable, ) => { return getCollateralParamsStream(collateralType, cdpParams).pipe( mergeMap((collateralParams) => - rest.ununifi.pricefeed.price(sdk, collateralParams.liquidation_market_id), + ununifi.rest.pricefeed.price(sdk, collateralParams.liquidation_market_id), ), map((res) => res.data.price!), ); diff --git a/projects/portal/src/app/views/auction/auctions/auction/auction.component.ts b/projects/portal/src/app/views/auction/auctions/auction/auction.component.ts index 1c3619bd8..c4b7a5ae7 100644 --- a/projects/portal/src/app/views/auction/auctions/auction/auction.component.ts +++ b/projects/portal/src/app/views/auction/auctions/auction/auction.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; @Component({ selector: 'view-auction', @@ -8,14 +8,14 @@ import { ununifi } from 'ununifi-client'; }) export class AuctionComponent implements OnInit { @Input() - auction?: ununifi.auction.CollateralAuction | null; + auction?: ununifi.proto.ununifi.auction.CollateralAuction | null; @Input() endTime?: Date | null; @Input() maxEndTime?: Date | null; - constructor() {} + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } } diff --git a/projects/portal/src/app/views/auction/auctions/auction/place-bid/place-bid.component.ts b/projects/portal/src/app/views/auction/auctions/auction/place-bid/place-bid.component.ts index 92f666a71..8961efaab 100644 --- a/projects/portal/src/app/views/auction/auctions/auction/place-bid/place-bid.component.ts +++ b/projects/portal/src/app/views/auction/auctions/auction/place-bid/place-bid.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import cosmosclient from '@cosmos-client/core'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; -import { ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; export type PlaceBidOnSubmitEvent = { key: Key; @@ -24,7 +24,7 @@ export class BidComponent implements OnInit { auctionID?: string | null; @Input() - auction?: ununifi.auction.CollateralAuction | null; + auction?: ununifi.proto.ununifi.auction.CollateralAuction | null; @Input() endTime?: Date | null; diff --git a/projects/portal/src/app/views/auction/auctions/auctions.component.ts b/projects/portal/src/app/views/auction/auctions/auctions.component.ts index 15735e9c6..423bb2e14 100644 --- a/projects/portal/src/app/views/auction/auctions/auctions.component.ts +++ b/projects/portal/src/app/views/auction/auctions/auctions.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; -import { ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; @Component({ selector: 'view-auctions', @@ -9,7 +9,7 @@ import { ununifi } from 'ununifi-client'; }) export class AuctionsComponent implements OnInit { @Input() - auctions?: (ununifi.auction.CollateralAuction | undefined)[] | null; + auctions?: (ununifi.proto.ununifi.auction.CollateralAuction | undefined)[] | null; @Input() pageSizeOptions?: number[] | null; @@ -27,7 +27,7 @@ export class AuctionsComponent implements OnInit { this.paginationChange = new EventEmitter(); } - ngOnInit(): void {} + ngOnInit(): void { } onPaginationChange(pageEvent: PageEvent): void { this.paginationChange.emit(pageEvent); diff --git a/projects/portal/src/app/views/mint/cdps/cdp/cdp.component.ts b/projects/portal/src/app/views/mint/cdps/cdp/cdp.component.ts index 6e0bd11d9..cb1d35fa8 100644 --- a/projects/portal/src/app/views/mint/cdps/cdp/cdp.component.ts +++ b/projects/portal/src/app/views/mint/cdps/cdp/cdp.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1, InlineResponse2006Deposits } from 'ununifi-client/esm/openapi'; @Component({ @@ -18,7 +18,7 @@ export class CdpComponent implements OnInit { denom?: string | null; @Input() - params?: ununifi.cdp.IParams | null; + params?: ununifi.proto.ununifi.cdp.IParams | null; @Input() cdp?: InlineResponse2004Cdp1 | null; @@ -27,10 +27,10 @@ export class CdpComponent implements OnInit { deposits?: InlineResponse2006Deposits[] | null; @Input() - spotPrice?: ununifi.pricefeed.ICurrentPrice | null; + spotPrice?: ununifi.proto.ununifi.pricefeed.ICurrentPrice | null; @Input() - liquidationPrice?: ununifi.pricefeed.ICurrentPrice | null; + liquidationPrice?: ununifi.proto.ununifi.pricefeed.ICurrentPrice | null; @Input() withdrawLimit?: number | null; @@ -38,7 +38,7 @@ export class CdpComponent implements OnInit { @Input() issueLimit?: number | null; - constructor() {} + constructor() { } ngOnInit(): void { setTimeout(() => { diff --git a/projects/portal/src/app/views/mint/cdps/create/create.component.ts b/projects/portal/src/app/views/mint/cdps/create/create.component.ts index 4911ac852..a588318ef 100644 --- a/projects/portal/src/app/views/mint/cdps/create/create.component.ts +++ b/projects/portal/src/app/views/mint/cdps/create/create.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import cosmosclient from '@cosmos-client/core'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; -import { ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; export type CreateCdpOnSubmitEvent = { @@ -25,16 +25,16 @@ export class CreateComponent implements OnInit { key?: Key | null; @Input() - cdpParams?: ununifi.cdp.IParams | null; + cdpParams?: ununifi.proto.ununifi.cdp.IParams | null; @Input() - collateralParams?: ununifi.cdp.ICollateralParam[] | null; + collateralParams?: ununifi.proto.ununifi.cdp.ICollateralParam[] | null; @Input() selectedCollateralType?: string | null; @Input() - selectedCollateralParam?: ununifi.cdp.ICollateralParam | null; + selectedCollateralParam?: ununifi.proto.ununifi.cdp.ICollateralParam | null; @Input() minimumGasPrices?: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] | null; diff --git a/projects/portal/src/app/views/mint/mint.component.ts b/projects/portal/src/app/views/mint/mint.component.ts index 1b8d351aa..706113e37 100644 --- a/projects/portal/src/app/views/mint/mint.component.ts +++ b/projects/portal/src/app/views/mint/mint.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit } from '@angular/core'; -import { ununifi } from 'ununifi-client'; +import ununifi from 'ununifi-client'; @Component({ selector: 'view-mint', @@ -8,10 +8,10 @@ import { ununifi } from 'ununifi-client'; }) export class MintComponent implements OnInit { @Input() - collateralParams?: ununifi.cdp.ICollateralParam[] | null; + collateralParams?: ununifi.proto.ununifi.cdp.ICollateralParam[] | null; @Input() - debtParams?: ununifi.cdp.IDebtParam[] | null; - constructor() {} + debtParams?: ununifi.proto.ununifi.cdp.IDebtParam[] | null; + constructor() { } - ngOnInit(): void {} + ngOnInit(): void { } } From 86a9262c04c16a5c720af4baa5d93d4406c246f7 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Fri, 1 Jul 2022 11:35:37 +0900 Subject: [PATCH 26/77] fix: refactor separate usecase --- .../app/pages/balance/balance.component.ts | 171 ++---------------- .../pages/balance/balance.usecase.service.ts | 171 ++++++++++++++++++ 2 files changed, 187 insertions(+), 155 deletions(-) create mode 100644 projects/portal/src/app/pages/balance/balance.usecase.service.ts diff --git a/projects/portal/src/app/pages/balance/balance.component.ts b/projects/portal/src/app/pages/balance/balance.component.ts index 3fdc5e062..89025c041 100644 --- a/projects/portal/src/app/pages/balance/balance.component.ts +++ b/projects/portal/src/app/pages/balance/balance.component.ts @@ -1,18 +1,9 @@ -import { CosmosSDKService } from '../../models'; -import { Config, ConfigService } from '../../models/config.service'; -import { CosmosWallet, StoredWallet, WalletType } from '../../models/wallets/wallet.model'; -import { WalletService } from '../../models/wallets/wallet.service'; -import { - convertTypedAccountToTypedName, - convertUnknownAccountToBaseAccount, - convertUnknownAccountToTypedAccount, -} from '../../utils/converter'; +import { WalletType } from '../../models/wallets/wallet.model'; +import { BalanceUsecaseService } from './balance.usecase.service'; import { Component, OnInit } from '@angular/core'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import { proto } from '@cosmos-client/core'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; -import { PubKey } from '@cosmos-client/core/esm/types'; -import { combineLatest, Observable, of } from 'rxjs'; -import { map, mergeMap } from 'rxjs/operators'; +import { Observable } from 'rxjs'; @Component({ selector: 'app-balance', @@ -20,31 +11,12 @@ import { map, mergeMap } from 'rxjs/operators'; styleUrls: ['./balance.component.css'], }) export class BalanceComponent implements OnInit { - config$: Observable; - currentStoredWallet$: Observable; - currentCosmosWallet$: Observable; walletId$: Observable; walletType$: Observable; - cosmosPublicKey$: Observable; - publicKey$: Observable; - cosmosAccAddress$: Observable; accAddress$: Observable; - cosmosValAddress$: Observable; - valAddress$: Observable; - cosmosUnknownAccount$: Observable; - cosmosAccount$: Observable< - | proto.cosmos.auth.v1beta1.BaseAccount - | proto.cosmos.vesting.v1beta1.BaseVestingAccount - | proto.cosmos.vesting.v1beta1.ContinuousVestingAccount - | proto.cosmos.vesting.v1beta1.DelayedVestingAccount - | proto.cosmos.vesting.v1beta1.PeriodicVestingAccount - | proto.cosmos.vesting.v1beta1.PermanentLockedAccount - | proto.cosmos.auth.v1beta1.ModuleAccount - | null - | undefined - >; - cosmosBaseAccount$: Observable; accountTypeName$: Observable; + publicKey$: Observable; + valAddress$: Observable; balances$: Observable; faucets$: Observable< | { @@ -58,127 +30,16 @@ export class BalanceComponent implements OnInit { >; nodeInfo$: Observable; - constructor( - private configService: ConfigService, - private cosmosSDK: CosmosSDKService, - private walletService: WalletService, - ) { - this.config$ = this.configService.config$; - const sdk$ = this.cosmosSDK.sdk$; - this.currentStoredWallet$ = this.walletService.currentStoredWallet$; - this.currentCosmosWallet$ = this.currentStoredWallet$.pipe( - map((storedWallet) => - storedWallet - ? this.walletService.convertStoredWalletToCosmosWallet(storedWallet) - : storedWallet, - ), - ); - this.walletId$ = this.currentStoredWallet$.pipe( - map((storedWallet) => (storedWallet ? storedWallet.id : storedWallet)), - ); - this.walletType$ = this.currentStoredWallet$.pipe( - map((storedWallet) => (storedWallet ? storedWallet.type : storedWallet)), - ); - this.cosmosPublicKey$ = this.currentCosmosWallet$.pipe( - map((cosmosWallet) => (cosmosWallet ? cosmosWallet.public_key : cosmosWallet)), - ); - this.publicKey$ = this.currentStoredWallet$.pipe( - map((storedWallet) => (storedWallet ? storedWallet.public_key : storedWallet)), - ); - this.cosmosAccAddress$ = this.currentCosmosWallet$.pipe( - map((cosmosWallet) => (cosmosWallet ? cosmosWallet.address : cosmosWallet)), - ); - this.accAddress$ = this.cosmosAccAddress$.pipe( - map((accAddress) => (accAddress ? accAddress.toString() : accAddress)), - ); - this.cosmosValAddress$ = this.currentCosmosWallet$.pipe( - map((cosmosWallet) => (cosmosWallet ? cosmosWallet.address.toValAddress() : cosmosWallet)), - ); - this.valAddress$ = this.cosmosValAddress$.pipe( - map((valAddress) => (valAddress ? valAddress.toString() : valAddress)), - ); - this.cosmosUnknownAccount$ = combineLatest([sdk$, this.cosmosAccAddress$]).pipe( - mergeMap(([sdk, cosmosAccAddress]) => { - if (!cosmosAccAddress) { - return of(cosmosAccAddress); - } - return rest.auth - .account(sdk.rest, cosmosAccAddress) - .then((res) => { - console.log(res.data.account); - return res; - }) - .then( - (res) => - res.data && - cosmosclient.codec.protoJSONToInstance( - cosmosclient.codec.castProtoJSONOfProtoAny(res.data.account), - ), - ) - .catch((error) => { - console.error(error); - return undefined; - }); - }), - ); - this.cosmosAccount$ = this.cosmosUnknownAccount$.pipe( - map((cosmosUnknownAccount) => convertUnknownAccountToTypedAccount(cosmosUnknownAccount)), - ); - this.cosmosBaseAccount$ = this.cosmosUnknownAccount$.pipe( - map((cosmosUnknownAccount) => convertUnknownAccountToBaseAccount(cosmosUnknownAccount)), - ); - this.accountTypeName$ = this.cosmosAccount$.pipe( - map((cosmosAccount) => convertTypedAccountToTypedName(cosmosAccount)), - ); - this.balances$ = combineLatest([sdk$, this.cosmosAccAddress$]).pipe( - mergeMap(([sdk, cosmosAccAddress]) => { - if (!cosmosAccAddress) { - return of(cosmosAccAddress); - } - return rest.bank - .allBalances(sdk.rest, cosmosAccAddress) - .then((res) => res.data.balances) - .catch((error) => { - console.error(error); - return undefined; - }); - }), - ); - this.faucets$ = combineLatest([this.config$, this.balances$]).pipe( - map(([config, balances]) => { - if (!config?.extension?.faucet?.length) { - return []; - } - const allFaucets = config.extension.faucet.filter((faucet) => faucet.hasFaucet); - if (balances === null) { - return []; - } - if (balances === undefined) { - return allFaucets; - } - if (balances.length === 0) { - return allFaucets; - } - return allFaucets?.filter((faucet) => { - const isNotFoundFaucetDenomBalance = - balances.find((balance) => balance.denom === faucet.denom) === undefined; - const faucetDenomBalanceAmount = balances.find( - (balance) => balance.denom === faucet.denom, - )?.amount; - const isLessThanMaxCreditFaucetDenomBalance = faucetDenomBalanceAmount - ? parseInt(faucetDenomBalanceAmount) <= faucet.maxCredit - : false; - if (isNotFoundFaucetDenomBalance || isLessThanMaxCreditFaucetDenomBalance) { - return true; - } else { - return false; - } - }); - }), - ); - this.nodeInfo$ = sdk$.pipe( - mergeMap((sdk) => rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), - ); + constructor(private usecase: BalanceUsecaseService) { + this.walletId$ = this.usecase.walletId$; + this.walletType$ = this.usecase.walletType$; + this.accAddress$ = this.usecase.accAddress$; + this.publicKey$ = this.usecase.publicKey$; + this.valAddress$ = this.usecase.valAddress$; + this.balances$ = this.usecase.balances$; + this.faucets$ = this.usecase.faucets$; + this.nodeInfo$ = this.usecase.nodeInfo$; + this.accountTypeName$ = this.usecase.accountTypeName$; } ngOnInit(): void {} diff --git a/projects/portal/src/app/pages/balance/balance.usecase.service.ts b/projects/portal/src/app/pages/balance/balance.usecase.service.ts new file mode 100644 index 000000000..0103d5d97 --- /dev/null +++ b/projects/portal/src/app/pages/balance/balance.usecase.service.ts @@ -0,0 +1,171 @@ +import { CosmosSDKService } from '../../models'; +import { Config, ConfigService } from '../../models/config.service'; +import { CosmosWallet, StoredWallet, WalletType } from '../../models/wallets/wallet.model'; +import { WalletService } from '../../models/wallets/wallet.service'; +import { + convertTypedAccountToTypedName, + convertUnknownAccountToTypedAccount, +} from './../../utils/converter'; +import { Injectable } from '@angular/core'; +import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; +import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; +import { combineLatest, Observable, of } from 'rxjs'; +import { map, mergeMap } from 'rxjs/operators'; + +@Injectable({ providedIn: 'root' }) +export class BalanceUsecaseService { + private config$: Observable; + private currentStoredWallet$: Observable; + private currentCosmosWallet$: Observable; + private sdk$: Observable<{ rest: CosmosSDK; websocket: CosmosSDK }>; + private cosmosAccAddress$: Observable; + + constructor( + private configService: ConfigService, + private cosmosSDK: CosmosSDKService, + private walletService: WalletService, + ) { + this.config$ = this.configService.config$; + this.sdk$ = this.cosmosSDK.sdk$; + this.currentStoredWallet$ = this.walletService.currentStoredWallet$; + this.currentCosmosWallet$ = this.currentStoredWallet$.pipe( + map((storedWallet) => + storedWallet + ? this.walletService.convertStoredWalletToCosmosWallet(storedWallet) + : storedWallet, + ), + ); + this.cosmosAccAddress$ = this.currentCosmosWallet$.pipe( + map((cosmosWallet) => (cosmosWallet ? cosmosWallet.address : cosmosWallet)), + ); + } + + get walletId$(): Observable { + return this.currentStoredWallet$.pipe( + map((storedWallet) => (storedWallet ? storedWallet.id : storedWallet)), + ); + } + get walletType$(): Observable { + return this.currentStoredWallet$.pipe( + map((storedWallet) => (storedWallet ? storedWallet.type : storedWallet)), + ); + } + get accAddress$(): Observable { + const cosmosAccAddress$ = this.currentCosmosWallet$.pipe( + map((cosmosWallet) => (cosmosWallet ? cosmosWallet.address : cosmosWallet)), + ); + return cosmosAccAddress$.pipe( + map((accAddress) => (accAddress ? accAddress.toString() : accAddress)), + ); + } + get accountTypeName$(): Observable { + const cosmosUnknownAccount$ = combineLatest([this.sdk$, this.cosmosAccAddress$]).pipe( + mergeMap(([sdk, cosmosAccAddress]) => { + if (!cosmosAccAddress) { + return of(cosmosAccAddress); + } + return rest.auth + .account(sdk.rest, cosmosAccAddress) + .then((res) => { + console.log(res.data.account); + return res; + }) + .then( + (res) => + res.data && + cosmosclient.codec.protoJSONToInstance( + cosmosclient.codec.castProtoJSONOfProtoAny(res.data.account), + ), + ) + .catch((error) => { + console.error(error); + return undefined; + }); + }), + ); + const cosmosAccount$ = cosmosUnknownAccount$.pipe( + map((cosmosUnknownAccount) => convertUnknownAccountToTypedAccount(cosmosUnknownAccount)), + ); + return cosmosAccount$.pipe( + map((cosmosAccount) => convertTypedAccountToTypedName(cosmosAccount)), + ); + } + get publicKey$(): Observable { + return this.currentStoredWallet$.pipe( + map((storedWallet) => (storedWallet ? storedWallet.public_key : storedWallet)), + ); + } + get valAddress$(): Observable { + const cosmosValAddress$ = this.currentCosmosWallet$.pipe( + map((cosmosWallet) => (cosmosWallet ? cosmosWallet.address.toValAddress() : cosmosWallet)), + ); + return cosmosValAddress$.pipe( + map((valAddress) => (valAddress ? valAddress.toString() : valAddress)), + ); + } + get balances$(): Observable { + return combineLatest([this.sdk$, this.cosmosAccAddress$]).pipe( + mergeMap(([sdk, cosmosAccAddress]) => { + if (!cosmosAccAddress) { + return of(cosmosAccAddress); + } + return rest.bank + .allBalances(sdk.rest, cosmosAccAddress) + .then((res) => res.data.balances) + .catch((error) => { + console.error(error); + return undefined; + }); + }), + ); + } + get faucets$(): Observable< + | { + hasFaucet: boolean; + faucetURL: string; + denom: string; + creditAmount: number; + maxCredit: number; + }[] + | undefined + > { + return combineLatest([this.config$, this.balances$]).pipe( + map(([config, balances]) => { + if (!config?.extension?.faucet?.length) { + return []; + } + const allFaucets = config.extension.faucet.filter((faucet) => faucet.hasFaucet); + if (balances === null) { + return []; + } + if (balances === undefined) { + return allFaucets; + } + if (balances.length === 0) { + return allFaucets; + } + return allFaucets?.filter((faucet) => { + const isNotFoundFaucetDenomBalance = + balances.find((balance) => balance.denom === faucet.denom) === undefined; + const faucetDenomBalanceAmount = balances.find( + (balance) => balance.denom === faucet.denom, + )?.amount; + const isLessThanMaxCreditFaucetDenomBalance = faucetDenomBalanceAmount + ? parseInt(faucetDenomBalanceAmount) <= faucet.maxCredit + : false; + if (isNotFoundFaucetDenomBalance || isLessThanMaxCreditFaucetDenomBalance) { + return true; + } else { + return false; + } + }); + }), + ); + } + get nodeInfo$(): Observable { + return this.sdk$.pipe( + mergeMap((sdk) => rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), + ); + } +} From dc0788fd3bf7ce8a9c5582f43c029acaf06388d5 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Fri, 1 Jul 2022 12:10:53 +0900 Subject: [PATCH 27/77] fix: small fix --- .../pages/balance/balance.usecase.service.ts | 52 +++++++------------ 1 file changed, 18 insertions(+), 34 deletions(-) diff --git a/projects/portal/src/app/pages/balance/balance.usecase.service.ts b/projects/portal/src/app/pages/balance/balance.usecase.service.ts index 0103d5d97..51cc61425 100644 --- a/projects/portal/src/app/pages/balance/balance.usecase.service.ts +++ b/projects/portal/src/app/pages/balance/balance.usecase.service.ts @@ -16,9 +16,9 @@ import { map, mergeMap } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class BalanceUsecaseService { private config$: Observable; + private sdk$: Observable<{ rest: CosmosSDK; websocket: CosmosSDK }>; private currentStoredWallet$: Observable; private currentCosmosWallet$: Observable; - private sdk$: Observable<{ rest: CosmosSDK; websocket: CosmosSDK }>; private cosmosAccAddress$: Observable; constructor( @@ -42,25 +42,31 @@ export class BalanceUsecaseService { } get walletId$(): Observable { - return this.currentStoredWallet$.pipe( - map((storedWallet) => (storedWallet ? storedWallet.id : storedWallet)), - ); + return this.currentStoredWallet$.pipe(map((wallet) => (wallet ? wallet.id : wallet))); } get walletType$(): Observable { - return this.currentStoredWallet$.pipe( - map((storedWallet) => (storedWallet ? storedWallet.type : storedWallet)), - ); + return this.currentStoredWallet$.pipe(map((wallet) => (wallet ? wallet.type : wallet))); } get accAddress$(): Observable { - const cosmosAccAddress$ = this.currentCosmosWallet$.pipe( - map((cosmosWallet) => (cosmosWallet ? cosmosWallet.address : cosmosWallet)), + return this.currentCosmosWallet$.pipe( + map((wallet) => (wallet ? wallet.address.toString() : wallet)), ); - return cosmosAccAddress$.pipe( - map((accAddress) => (accAddress ? accAddress.toString() : accAddress)), + } + get publicKey$(): Observable { + return this.currentStoredWallet$.pipe(map((wallet) => (wallet ? wallet.public_key : wallet))); + } + get valAddress$(): Observable { + return this.currentCosmosWallet$.pipe( + map((wallet) => (wallet ? wallet.address.toValAddress().toString() : wallet)), + ); + } + get nodeInfo$(): Observable { + return this.sdk$.pipe( + mergeMap((sdk) => rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), ); } get accountTypeName$(): Observable { - const cosmosUnknownAccount$ = combineLatest([this.sdk$, this.cosmosAccAddress$]).pipe( + return combineLatest([this.sdk$, this.cosmosAccAddress$]).pipe( mergeMap(([sdk, cosmosAccAddress]) => { if (!cosmosAccAddress) { return of(cosmosAccAddress); @@ -83,27 +89,10 @@ export class BalanceUsecaseService { return undefined; }); }), - ); - const cosmosAccount$ = cosmosUnknownAccount$.pipe( map((cosmosUnknownAccount) => convertUnknownAccountToTypedAccount(cosmosUnknownAccount)), - ); - return cosmosAccount$.pipe( map((cosmosAccount) => convertTypedAccountToTypedName(cosmosAccount)), ); } - get publicKey$(): Observable { - return this.currentStoredWallet$.pipe( - map((storedWallet) => (storedWallet ? storedWallet.public_key : storedWallet)), - ); - } - get valAddress$(): Observable { - const cosmosValAddress$ = this.currentCosmosWallet$.pipe( - map((cosmosWallet) => (cosmosWallet ? cosmosWallet.address.toValAddress() : cosmosWallet)), - ); - return cosmosValAddress$.pipe( - map((valAddress) => (valAddress ? valAddress.toString() : valAddress)), - ); - } get balances$(): Observable { return combineLatest([this.sdk$, this.cosmosAccAddress$]).pipe( mergeMap(([sdk, cosmosAccAddress]) => { @@ -163,9 +152,4 @@ export class BalanceUsecaseService { }), ); } - get nodeInfo$(): Observable { - return this.sdk$.pipe( - mergeMap((sdk) => rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), - ); - } } From 9b5e92fc8029b2f3839edc85aabe97f7d2421262 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Fri, 1 Jul 2022 15:52:03 +0900 Subject: [PATCH 28/77] test: add balance usecase test --- .../pages/balance/balance.usecase.service.ts | 2 +- .../app/pages/balance/balance.usecase.spec.ts | 72 +++++++++++++++++++ tsconfig.json | 4 ++ 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 projects/portal/src/app/pages/balance/balance.usecase.spec.ts diff --git a/projects/portal/src/app/pages/balance/balance.usecase.service.ts b/projects/portal/src/app/pages/balance/balance.usecase.service.ts index 51cc61425..82c2e915c 100644 --- a/projects/portal/src/app/pages/balance/balance.usecase.service.ts +++ b/projects/portal/src/app/pages/balance/balance.usecase.service.ts @@ -1,5 +1,5 @@ -import { CosmosSDKService } from '../../models'; import { Config, ConfigService } from '../../models/config.service'; +import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { CosmosWallet, StoredWallet, WalletType } from '../../models/wallets/wallet.model'; import { WalletService } from '../../models/wallets/wallet.service'; import { diff --git a/projects/portal/src/app/pages/balance/balance.usecase.spec.ts b/projects/portal/src/app/pages/balance/balance.usecase.spec.ts new file mode 100644 index 000000000..c3cbb8cab --- /dev/null +++ b/projects/portal/src/app/pages/balance/balance.usecase.spec.ts @@ -0,0 +1,72 @@ +import { ConfigService } from '../../models/config.service'; +import { CosmosSDKService } from '../../models/cosmos-sdk.service'; +import { WalletService } from '../../models/wallets/wallet.service'; +import { BalanceUsecaseService } from './balance.usecase.service'; +import { TestBed } from '@angular/core/testing'; +import { combineLatest, of } from 'rxjs'; + +jest.mock('./../../utils/converter', () => { + return { + convertUnknownAccountToTypedAccount: jest.fn(() => undefined), + convertTypedAccountToTypedName: jest.fn(() => undefined), + }; +}); + +jest.mock('@cosmos-client/core', () => { + const mockClass: jest.MockedClass = jest.fn((...args) => { + const instance = Object.create(mockClass.prototype); + return Object.assign(instance, { args }); + }); + return { + rest: { + tendermint: { + getNodeInfo: jest.fn(() => Promise.resolve({ data: undefined })), + }, + }, + }; +}); + +describe('BalanceUsecaseService', () => { + let service: BalanceUsecaseService; + + beforeEach(async () => { + const mockWalletService = { + currentStoredWallet$: of(undefined), + }; + const mockCosmosSDKService = { + sdk$: of({ rest: undefined, websocket: undefined }), + }; + const mockConfigService = { + config$: of(undefined), + }; + TestBed.configureTestingModule({ + providers: [ + BalanceUsecaseService, + { provide: ConfigService, useValue: mockConfigService }, + { provide: CosmosSDKService, useValue: mockCosmosSDKService }, + { provide: WalletService, useValue: mockWalletService }, + ], + }); + service = TestBed.inject(BalanceUsecaseService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); + + it('すべてundefinedが返ってくる', (done) => { + combineLatest([ + service.walletId$, + service.walletType$, + service.accAddress$, + service.publicKey$, + service.valAddress$, + service.nodeInfo$, + service.accountTypeName$, + service.balances$, + ]).subscribe((values) => { + expect(values.every((v) => v === undefined)).toBeTruthy(); + done(); + }); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index 7cd299872..5ffa5bfa6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -48,6 +48,10 @@ "dom", "esnext.asynciterable" ], + "types": [ + "node", + "jest" + ], "allowSyntheticDefaultImports": true }, "angularCompilerOptions": { From 569c0c77e5134931718f8556639e716d68b42e2a Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Fri, 1 Jul 2022 16:21:36 +0900 Subject: [PATCH 29/77] fix: refactor separate cosmos rest service --- .../src/app/models/cosmos-rest.service.ts | 46 +++++++++++++++++++ .../pages/balance/balance.usecase.service.ts | 34 +++----------- .../app/pages/balance/balance.usecase.spec.ts | 28 +++-------- 3 files changed, 59 insertions(+), 49 deletions(-) create mode 100644 projects/portal/src/app/models/cosmos-rest.service.ts diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts new file mode 100644 index 000000000..c8aed658f --- /dev/null +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -0,0 +1,46 @@ +import { Injectable } from '@angular/core'; +import { cosmosclient, rest } from '@cosmos-client/core'; +import { + InlineResponse20012 as InlineResponse, + InlineResponse2003Balances as InlineResponseBalances, +} from '@cosmos-client/core/esm/openapi'; + +@Injectable({ providedIn: 'root' }) +export class CosmosRestService { + constructor() {} + + async getNodeInfo(sdk: cosmosclient.CosmosSDK): Promise { + const res = await rest.tendermint.getNodeInfo(sdk); + return res.data; + } + + async allBalances( + sdk: cosmosclient.CosmosSDK, + cosmosAccAddress: cosmosclient.AccAddress, + ): Promise { + try { + const res = await rest.bank.allBalances(sdk, cosmosAccAddress); + return res.data.balances; + } catch (error) { + console.error(error); + return undefined; + } + } + + async getAccount( + sdk: cosmosclient.CosmosSDK, + cosmosAccAddress: cosmosclient.AccAddress, + ): Promise { + try { + const res = await rest.auth.account(sdk, cosmosAccAddress); + console.log(res.data.account); + return (res.data && + cosmosclient.codec.protoJSONToInstance( + cosmosclient.codec.castProtoJSONOfProtoAny(res.data.account), + )) as any; + } catch (error) { + console.error(error); + return undefined; + } + } +} diff --git a/projects/portal/src/app/pages/balance/balance.usecase.service.ts b/projects/portal/src/app/pages/balance/balance.usecase.service.ts index 82c2e915c..2f50c88f4 100644 --- a/projects/portal/src/app/pages/balance/balance.usecase.service.ts +++ b/projects/portal/src/app/pages/balance/balance.usecase.service.ts @@ -1,4 +1,5 @@ import { Config, ConfigService } from '../../models/config.service'; +import { CosmosRestService } from '../../models/cosmos-rest.service'; import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { CosmosWallet, StoredWallet, WalletType } from '../../models/wallets/wallet.model'; import { WalletService } from '../../models/wallets/wallet.service'; @@ -7,7 +8,7 @@ import { convertUnknownAccountToTypedAccount, } from './../../utils/converter'; import { Injectable } from '@angular/core'; -import { cosmosclient, proto, rest } from '@cosmos-client/core'; +import { cosmosclient, proto } from '@cosmos-client/core'; import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable, of } from 'rxjs'; @@ -25,6 +26,7 @@ export class BalanceUsecaseService { private configService: ConfigService, private cosmosSDK: CosmosSDKService, private walletService: WalletService, + private rest: CosmosRestService, ) { this.config$ = this.configService.config$; this.sdk$ = this.cosmosSDK.sdk$; @@ -61,9 +63,7 @@ export class BalanceUsecaseService { ); } get nodeInfo$(): Observable { - return this.sdk$.pipe( - mergeMap((sdk) => rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), - ); + return this.sdk$.pipe(mergeMap((sdk) => this.rest.getNodeInfo(sdk.rest))); } get accountTypeName$(): Observable { return combineLatest([this.sdk$, this.cosmosAccAddress$]).pipe( @@ -71,23 +71,7 @@ export class BalanceUsecaseService { if (!cosmosAccAddress) { return of(cosmosAccAddress); } - return rest.auth - .account(sdk.rest, cosmosAccAddress) - .then((res) => { - console.log(res.data.account); - return res; - }) - .then( - (res) => - res.data && - cosmosclient.codec.protoJSONToInstance( - cosmosclient.codec.castProtoJSONOfProtoAny(res.data.account), - ), - ) - .catch((error) => { - console.error(error); - return undefined; - }); + return this.rest.getAccount(sdk.rest, cosmosAccAddress); }), map((cosmosUnknownAccount) => convertUnknownAccountToTypedAccount(cosmosUnknownAccount)), map((cosmosAccount) => convertTypedAccountToTypedName(cosmosAccount)), @@ -99,13 +83,7 @@ export class BalanceUsecaseService { if (!cosmosAccAddress) { return of(cosmosAccAddress); } - return rest.bank - .allBalances(sdk.rest, cosmosAccAddress) - .then((res) => res.data.balances) - .catch((error) => { - console.error(error); - return undefined; - }); + return this.rest.allBalances(sdk.rest, cosmosAccAddress); }), ); } diff --git a/projects/portal/src/app/pages/balance/balance.usecase.spec.ts b/projects/portal/src/app/pages/balance/balance.usecase.spec.ts index c3cbb8cab..1b6d12fd7 100644 --- a/projects/portal/src/app/pages/balance/balance.usecase.spec.ts +++ b/projects/portal/src/app/pages/balance/balance.usecase.spec.ts @@ -1,31 +1,11 @@ import { ConfigService } from '../../models/config.service'; +import { CosmosRestService } from '../../models/cosmos-rest.service'; import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { WalletService } from '../../models/wallets/wallet.service'; import { BalanceUsecaseService } from './balance.usecase.service'; import { TestBed } from '@angular/core/testing'; import { combineLatest, of } from 'rxjs'; -jest.mock('./../../utils/converter', () => { - return { - convertUnknownAccountToTypedAccount: jest.fn(() => undefined), - convertTypedAccountToTypedName: jest.fn(() => undefined), - }; -}); - -jest.mock('@cosmos-client/core', () => { - const mockClass: jest.MockedClass = jest.fn((...args) => { - const instance = Object.create(mockClass.prototype); - return Object.assign(instance, { args }); - }); - return { - rest: { - tendermint: { - getNodeInfo: jest.fn(() => Promise.resolve({ data: undefined })), - }, - }, - }; -}); - describe('BalanceUsecaseService', () => { let service: BalanceUsecaseService; @@ -39,12 +19,18 @@ describe('BalanceUsecaseService', () => { const mockConfigService = { config$: of(undefined), }; + const mockCosmosRestService = { + getAccount: jest.fn(() => of(undefined)), + allBalance: jest.fn(() => of(undefined)), + getNodeInfo: jest.fn(() => of(undefined)), + }; TestBed.configureTestingModule({ providers: [ BalanceUsecaseService, { provide: ConfigService, useValue: mockConfigService }, { provide: CosmosSDKService, useValue: mockCosmosSDKService }, { provide: WalletService, useValue: mockWalletService }, + { provide: CosmosRestService, useValue: mockCosmosRestService }, ], }); service = TestBed.inject(BalanceUsecaseService); From 45afa45eb90383a017abf45bdad3644bc7d52115 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Fri, 1 Jul 2022 16:56:35 +0900 Subject: [PATCH 30/77] fix: refactor move cosmos sdk in cosmos-rest service --- .../src/app/models/cosmos-rest.service.ts | 67 +++++++++++-------- .../pages/balance/balance.usecase.service.ts | 19 ++---- .../app/pages/balance/balance.usecase.spec.ts | 11 +-- 3 files changed, 48 insertions(+), 49 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index c8aed658f..3cd723ead 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -1,46 +1,55 @@ +import { CosmosSDKService } from './cosmos-sdk.service'; import { Injectable } from '@angular/core'; import { cosmosclient, rest } from '@cosmos-client/core'; +import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; import { InlineResponse20012 as InlineResponse, InlineResponse2003Balances as InlineResponseBalances, } from '@cosmos-client/core/esm/openapi'; +import { Observable, of } from 'rxjs'; +import { catchError, map, mergeMap, pluck, tap } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class CosmosRestService { - constructor() {} + private restSdk$: Observable; - async getNodeInfo(sdk: cosmosclient.CosmosSDK): Promise { - const res = await rest.tendermint.getNodeInfo(sdk); - return res.data; + constructor(private cosmosSDK: CosmosSDKService) { + this.restSdk$ = this.cosmosSDK.sdk$.pipe(pluck('rest')); } - async allBalances( - sdk: cosmosclient.CosmosSDK, - cosmosAccAddress: cosmosclient.AccAddress, - ): Promise { - try { - const res = await rest.bank.allBalances(sdk, cosmosAccAddress); - return res.data.balances; - } catch (error) { - console.error(error); - return undefined; - } + getNodeInfo$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => rest.tendermint.getNodeInfo(sdk)), + map((res) => res.data), + ); } - async getAccount( - sdk: cosmosclient.CosmosSDK, + allBalances$( cosmosAccAddress: cosmosclient.AccAddress, - ): Promise { - try { - const res = await rest.auth.account(sdk, cosmosAccAddress); - console.log(res.data.account); - return (res.data && - cosmosclient.codec.protoJSONToInstance( - cosmosclient.codec.castProtoJSONOfProtoAny(res.data.account), - )) as any; - } catch (error) { - console.error(error); - return undefined; - } + ): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => rest.bank.allBalances(sdk, cosmosAccAddress)), + map((res) => res.data.balances), + catchError((error) => { + console.error(error); + return of(undefined); + }), + ); + } + + getAccount$(cosmosAccAddress: cosmosclient.AccAddress): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => rest.auth.account(sdk, cosmosAccAddress)), + tap((res) => console.log(res.data.account)), + map((res) => res.data.account), + map((account) => { + const { protoJSONToInstance, castProtoJSONOfProtoAny } = cosmosclient.codec; + return (account && protoJSONToInstance(castProtoJSONOfProtoAny(account))) as InlineResponse; + }), + catchError((error) => { + console.error(error); + return of(undefined); + }), + ); } } diff --git a/projects/portal/src/app/pages/balance/balance.usecase.service.ts b/projects/portal/src/app/pages/balance/balance.usecase.service.ts index 2f50c88f4..801ef5ae9 100644 --- a/projects/portal/src/app/pages/balance/balance.usecase.service.ts +++ b/projects/portal/src/app/pages/balance/balance.usecase.service.ts @@ -1,6 +1,5 @@ import { Config, ConfigService } from '../../models/config.service'; import { CosmosRestService } from '../../models/cosmos-rest.service'; -import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { CosmosWallet, StoredWallet, WalletType } from '../../models/wallets/wallet.model'; import { WalletService } from '../../models/wallets/wallet.service'; import { @@ -9,7 +8,6 @@ import { } from './../../utils/converter'; import { Injectable } from '@angular/core'; import { cosmosclient, proto } from '@cosmos-client/core'; -import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; import { combineLatest, Observable, of } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -17,19 +15,16 @@ import { map, mergeMap } from 'rxjs/operators'; @Injectable({ providedIn: 'root' }) export class BalanceUsecaseService { private config$: Observable; - private sdk$: Observable<{ rest: CosmosSDK; websocket: CosmosSDK }>; private currentStoredWallet$: Observable; private currentCosmosWallet$: Observable; private cosmosAccAddress$: Observable; constructor( private configService: ConfigService, - private cosmosSDK: CosmosSDKService, private walletService: WalletService, private rest: CosmosRestService, ) { this.config$ = this.configService.config$; - this.sdk$ = this.cosmosSDK.sdk$; this.currentStoredWallet$ = this.walletService.currentStoredWallet$; this.currentCosmosWallet$ = this.currentStoredWallet$.pipe( map((storedWallet) => @@ -63,27 +58,27 @@ export class BalanceUsecaseService { ); } get nodeInfo$(): Observable { - return this.sdk$.pipe(mergeMap((sdk) => this.rest.getNodeInfo(sdk.rest))); + return this.rest.getNodeInfo$(); } get accountTypeName$(): Observable { - return combineLatest([this.sdk$, this.cosmosAccAddress$]).pipe( - mergeMap(([sdk, cosmosAccAddress]) => { + return this.cosmosAccAddress$.pipe( + mergeMap((cosmosAccAddress) => { if (!cosmosAccAddress) { return of(cosmosAccAddress); } - return this.rest.getAccount(sdk.rest, cosmosAccAddress); + return this.rest.getAccount$(cosmosAccAddress); }), map((cosmosUnknownAccount) => convertUnknownAccountToTypedAccount(cosmosUnknownAccount)), map((cosmosAccount) => convertTypedAccountToTypedName(cosmosAccount)), ); } get balances$(): Observable { - return combineLatest([this.sdk$, this.cosmosAccAddress$]).pipe( - mergeMap(([sdk, cosmosAccAddress]) => { + return this.cosmosAccAddress$.pipe( + mergeMap((cosmosAccAddress) => { if (!cosmosAccAddress) { return of(cosmosAccAddress); } - return this.rest.allBalances(sdk.rest, cosmosAccAddress); + return this.rest.allBalances$(cosmosAccAddress); }), ); } diff --git a/projects/portal/src/app/pages/balance/balance.usecase.spec.ts b/projects/portal/src/app/pages/balance/balance.usecase.spec.ts index 1b6d12fd7..7b6e4e3c4 100644 --- a/projects/portal/src/app/pages/balance/balance.usecase.spec.ts +++ b/projects/portal/src/app/pages/balance/balance.usecase.spec.ts @@ -1,6 +1,5 @@ import { ConfigService } from '../../models/config.service'; import { CosmosRestService } from '../../models/cosmos-rest.service'; -import { CosmosSDKService } from '../../models/cosmos-sdk.service'; import { WalletService } from '../../models/wallets/wallet.service'; import { BalanceUsecaseService } from './balance.usecase.service'; import { TestBed } from '@angular/core/testing'; @@ -13,22 +12,18 @@ describe('BalanceUsecaseService', () => { const mockWalletService = { currentStoredWallet$: of(undefined), }; - const mockCosmosSDKService = { - sdk$: of({ rest: undefined, websocket: undefined }), - }; const mockConfigService = { config$: of(undefined), }; const mockCosmosRestService = { - getAccount: jest.fn(() => of(undefined)), - allBalance: jest.fn(() => of(undefined)), - getNodeInfo: jest.fn(() => of(undefined)), + getAccount$: jest.fn(() => of(undefined)), + allBalance$: jest.fn(() => of(undefined)), + getNodeInfo$: jest.fn(() => of(undefined)), }; TestBed.configureTestingModule({ providers: [ BalanceUsecaseService, { provide: ConfigService, useValue: mockConfigService }, - { provide: CosmosSDKService, useValue: mockCosmosSDKService }, { provide: WalletService, useValue: mockWalletService }, { provide: CosmosRestService, useValue: mockCosmosRestService }, ], From 4ef96d05e1a43d8e3db40e1ce9095b0ca87c4db2 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Fri, 1 Jul 2022 17:38:44 +0900 Subject: [PATCH 31/77] fix: refactor throughMap --- .../pages/balance/balance.usecase.service.ts | 21 ++++++++----------- projects/portal/src/app/utils/pipes.ts | 14 +++++++++++++ 2 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 projects/portal/src/app/utils/pipes.ts diff --git a/projects/portal/src/app/pages/balance/balance.usecase.service.ts b/projects/portal/src/app/pages/balance/balance.usecase.service.ts index 801ef5ae9..fe23d7aee 100644 --- a/projects/portal/src/app/pages/balance/balance.usecase.service.ts +++ b/projects/portal/src/app/pages/balance/balance.usecase.service.ts @@ -2,6 +2,7 @@ import { Config, ConfigService } from '../../models/config.service'; import { CosmosRestService } from '../../models/cosmos-rest.service'; import { CosmosWallet, StoredWallet, WalletType } from '../../models/wallets/wallet.model'; import { WalletService } from '../../models/wallets/wallet.service'; +import { throughMap } from '../../utils/pipes'; import { convertTypedAccountToTypedName, convertUnknownAccountToTypedAccount, @@ -27,34 +28,30 @@ export class BalanceUsecaseService { this.config$ = this.configService.config$; this.currentStoredWallet$ = this.walletService.currentStoredWallet$; this.currentCosmosWallet$ = this.currentStoredWallet$.pipe( - map((storedWallet) => - storedWallet - ? this.walletService.convertStoredWalletToCosmosWallet(storedWallet) - : storedWallet, + throughMap((storedWallet) => + this.walletService.convertStoredWalletToCosmosWallet(storedWallet), ), ); this.cosmosAccAddress$ = this.currentCosmosWallet$.pipe( - map((cosmosWallet) => (cosmosWallet ? cosmosWallet.address : cosmosWallet)), + throughMap((cosmosWallet) => cosmosWallet.address), ); } get walletId$(): Observable { - return this.currentStoredWallet$.pipe(map((wallet) => (wallet ? wallet.id : wallet))); + return this.currentStoredWallet$.pipe(throughMap((wallet) => wallet.id)); } get walletType$(): Observable { - return this.currentStoredWallet$.pipe(map((wallet) => (wallet ? wallet.type : wallet))); + return this.currentStoredWallet$.pipe(throughMap((wallet) => wallet.type)); } get accAddress$(): Observable { - return this.currentCosmosWallet$.pipe( - map((wallet) => (wallet ? wallet.address.toString() : wallet)), - ); + return this.currentCosmosWallet$.pipe(throughMap((wallet) => wallet.address.toString())); } get publicKey$(): Observable { - return this.currentStoredWallet$.pipe(map((wallet) => (wallet ? wallet.public_key : wallet))); + return this.currentStoredWallet$.pipe(throughMap((wallet) => wallet.public_key)); } get valAddress$(): Observable { return this.currentCosmosWallet$.pipe( - map((wallet) => (wallet ? wallet.address.toValAddress().toString() : wallet)), + throughMap((wallet) => wallet.address.toValAddress().toString()), ); } get nodeInfo$(): Observable { diff --git a/projects/portal/src/app/utils/pipes.ts b/projects/portal/src/app/utils/pipes.ts new file mode 100644 index 000000000..b7dda0867 --- /dev/null +++ b/projects/portal/src/app/utils/pipes.ts @@ -0,0 +1,14 @@ +import { Observable, pipe, UnaryFunction } from 'rxjs'; +import { map } from 'rxjs/operators'; + +/** + * nullかundefinedの場合はそのまま返し、そうでない場合はコールバックの返り値を返す + */ +export const throughMap = ( + fn: (value: T) => U, +): UnaryFunction, Observable> => + pipe( + map((v: T | null | undefined) => + v !== null && v !== undefined ? fn(v) : (v as null | undefined), + ), + ); From 1207d31f62e9d8c167e8c37b3ebffe60b23462df Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Fri, 1 Jul 2022 17:59:02 +0900 Subject: [PATCH 32/77] fix: english comment --- projects/portal/src/app/pages/balance/balance.usecase.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/portal/src/app/pages/balance/balance.usecase.spec.ts b/projects/portal/src/app/pages/balance/balance.usecase.spec.ts index 7b6e4e3c4..40b9f77bb 100644 --- a/projects/portal/src/app/pages/balance/balance.usecase.spec.ts +++ b/projects/portal/src/app/pages/balance/balance.usecase.spec.ts @@ -35,7 +35,7 @@ describe('BalanceUsecaseService', () => { expect(service).toBeTruthy(); }); - it('すべてundefinedが返ってくる', (done) => { + it('all getters return undefined', (done) => { combineLatest([ service.walletId$, service.walletType$, From 10d3d81384de90016bbe7933f70223bb4bdd15a2 Mon Sep 17 00:00:00 2001 From: taro04 Date: Fri, 1 Jul 2022 21:24:58 +0900 Subject: [PATCH 33/77] fix: fixed cypress with reference to #239 --- projects/portal/cypress/integration/{spec.ts => e2e.spec.ts} | 0 projects/portal/jest.config.js | 4 +--- 2 files changed, 1 insertion(+), 3 deletions(-) rename projects/portal/cypress/integration/{spec.ts => e2e.spec.ts} (100%) diff --git a/projects/portal/cypress/integration/spec.ts b/projects/portal/cypress/integration/e2e.spec.ts similarity index 100% rename from projects/portal/cypress/integration/spec.ts rename to projects/portal/cypress/integration/e2e.spec.ts diff --git a/projects/portal/jest.config.js b/projects/portal/jest.config.js index c6aaa6c3a..0b5ec088d 100644 --- a/projects/portal/jest.config.js +++ b/projects/portal/jest.config.js @@ -1,7 +1,5 @@ -require('jest-preset-angular/ngcc-jest-processor'); - module.exports = { preset: 'jest-preset-angular', setupFilesAfterEnv: ['/projects/portal/src/setup-jest.ts'], - testPathIgnorePatterns: ['/projects/portal/cypress/'] + testPathIgnorePatterns: ['/node_modules/', '/projects/explorer/cypress/'], }; From e69dae8af0257a2f20e04d0e45f107ea8f9ea50e Mon Sep 17 00:00:00 2001 From: taro04 Date: Fri, 1 Jul 2022 22:52:42 +0900 Subject: [PATCH 34/77] feat: fix uppercase number --- projects/explorer/src/app/app.component.ts | 17 +++++++++++------ projects/marketplace/src/app/app.component.ts | 17 +++++++++++------ projects/portal/src/app/app.component.ts | 17 +++++++++++------ 3 files changed, 33 insertions(+), 18 deletions(-) diff --git a/projects/explorer/src/app/app.component.ts b/projects/explorer/src/app/app.component.ts index e15e86938..0f5a5e9c4 100644 --- a/projects/explorer/src/app/app.component.ts +++ b/projects/explorer/src/app/app.component.ts @@ -92,11 +92,16 @@ export class AppComponent implements OnInit { } try { return rest.tendermint.getLatestBlock(sdk.rest).then((res) => { - return res.data && - res.data.block?.header?.height && - BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) - ? BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) - : false; + try { + return res.data && + res.data.block?.header?.height && + BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) + ? BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) + : false; + } + catch (error) { + return false; + } }); } catch (error) { return of(false); @@ -218,5 +223,5 @@ export class AppComponent implements OnInit { this.configS.setCurrentConfig(value); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/marketplace/src/app/app.component.ts b/projects/marketplace/src/app/app.component.ts index a60e513c7..88de727dc 100644 --- a/projects/marketplace/src/app/app.component.ts +++ b/projects/marketplace/src/app/app.component.ts @@ -83,11 +83,16 @@ export class AppComponent implements OnInit { } try { return rest.tendermint.getLatestBlock(sdk.rest).then((res) => { - return res.data && - res.data.block?.header?.height && - BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) - ? BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) - : false; + try { + return res.data && + res.data.block?.header?.height && + BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) + ? BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) + : false; + } + catch (error) { + return false; + } }); } catch (error) { return of(false); @@ -217,5 +222,5 @@ export class AppComponent implements OnInit { this.configS.setCurrentConfig(value); } - ngOnInit() {} + ngOnInit() { } } diff --git a/projects/portal/src/app/app.component.ts b/projects/portal/src/app/app.component.ts index ee417fc71..1d528afd5 100644 --- a/projects/portal/src/app/app.component.ts +++ b/projects/portal/src/app/app.component.ts @@ -101,11 +101,16 @@ export class AppComponent implements OnInit { } try { return rest.tendermint.getLatestBlock(sdk.rest).then((res) => { - return res.data && - res.data.block?.header?.height && - BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) - ? BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) - : false; + try { + return res.data && + res.data.block?.header?.height && + BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) + ? BigInt(res.data.block?.header?.height) > BigInt(searchBoxInputValue) + : false; + } + catch (error) { + return false; + } }); } catch (error) { return of(false); @@ -235,5 +240,5 @@ export class AppComponent implements OnInit { this.configS.setCurrentConfig(value); } - ngOnInit() {} + ngOnInit() { } } From aeba373dda3037b13920e8562e25eb23c2639a50 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Mon, 4 Jul 2022 10:13:14 +0900 Subject: [PATCH 35/77] fix: update package.json Fixed package version @cosmos-client/core --- package-lock.json | 3667 +++++++++++++++++++++++---------------------- package.json | 4 +- 2 files changed, 1872 insertions(+), 1799 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5187f3c23..49cad2992 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.46.0-rc2", + "@cosmos-client/core": "0.46.0-rc2", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -47,7 +47,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.3.0", - "ununifi-client": "^0.46.0-rc2", + "ununifi-client": "0.46.0-rc2", "zone.js": "~0.11.4" }, "devDependencies": { @@ -778,9 +778,9 @@ } }, "node_modules/@apollo/client": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.6.6.tgz", - "integrity": "sha512-AzNLN043wy0bDTTR9wzKYSu+I1IT2Ox3+vWckxgIt88Jfw5jHBvumf3lXE1JlgvbFCTiKS/Sa66AadQXWMVBRQ==", + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.6.9.tgz", + "integrity": "sha512-Y1yu8qa2YeaCUBVuw08x8NHenFi0sw2I3KCu7Kw9mDSu86HmmtHJkCAifKVrN2iPgDTW/BbP3EpSV8/EQCcxZA==", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@wry/context": "^0.6.0", @@ -820,21 +820,21 @@ "dev": true }, "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dev": true, "dependencies": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.10.tgz", - "integrity": "sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.6.tgz", + "integrity": "sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -924,26 +924,26 @@ } }, "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", - "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz", + "integrity": "sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw==", "dev": true, "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz", - "integrity": "sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz", + "integrity": "sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.17.10", - "@babel/helper-validator-option": "^7.16.7", + "@babel/compat-data": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.20.2", "semver": "^6.3.0" }, @@ -964,18 +964,18 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz", - "integrity": "sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz", + "integrity": "sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-member-expression-to-functions": "^7.17.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-member-expression-to-functions": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -985,25 +985,25 @@ } }, "node_modules/@babel/helper-create-class-features-plugin/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.12.tgz", - "integrity": "sha512-b2aZrV4zvutr9AIa6/gA3wsZKRwTKYoDxYiFKcESS3Ug2GTXzwBEvMuuFLhCQpEnRXs1zng4ISAXSUxxKBIcxw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", + "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "regexpu-core": "^5.0.1" + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.1.0" }, "engines": { "node": ">=6.9.0" @@ -1013,12 +1013,12 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1053,303 +1053,307 @@ } }, "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", - "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz", + "integrity": "sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", - "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz", + "integrity": "sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==", "dev": true, "dependencies": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/template": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-function-name/node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", + "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz", - "integrity": "sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz", + "integrity": "sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng==", "dev": true, "dependencies": { - "@babel/types": "^7.17.0" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz", - "integrity": "sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz", + "integrity": "sha512-L//phhB4al5uucwzlimruukHB3jRd5JGClwRMD/ROrVjXfLqovYnvQrK/JK36WYyVwGGO7OD3kMyVTjx+WVPhw==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.0", - "@babel/types": "^7.18.0" + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms/node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", + "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", - "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz", - "integrity": "sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz", + "integrity": "sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", - "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz", + "integrity": "sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-wrap-function": "^7.16.8", - "@babel/types": "^7.16.8" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-wrap-function": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.2.tgz", - "integrity": "sha512-XzAIyxx+vFnrOxiQrToSUOzUOn0e1J2Li40ntddek1Y69AXUTXoDJ40/D5RdjFu7s7qHiaeoTiempZcbuVXh2Q==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz", + "integrity": "sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-member-expression-to-functions": "^7.17.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/traverse": "^7.18.2", - "@babel/types": "^7.18.2" + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-member-expression-to-functions": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-simple-access": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz", - "integrity": "sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", "dev": true, "dependencies": { - "@babel/types": "^7.18.2" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", - "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz", + "integrity": "sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", + "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", - "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz", + "integrity": "sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw==", "dev": true, "dependencies": { - "@babel/helper-function-name": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.8", - "@babel/types": "^7.16.8" + "@babel/helper-function-name": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function/node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", + "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.2.tgz", - "integrity": "sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz", + "integrity": "sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ==", "dev": true, "dependencies": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.2", - "@babel/types": "^7.18.2" + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers/node_modules/@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", + "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", - "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -1358,9 +1362,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", - "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.6.tgz", + "integrity": "sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1370,14 +1374,14 @@ } }, "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.17.12.tgz", - "integrity": "sha512-/vt0hpIw0x4b6BLKUkwlvEoiGZYYLNZ96CzyHYPbtG2jZGz6LBe7/V+drYrc/d+ovrF9NBi0pmtvmNb/FsWtRQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz", + "integrity": "sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", - "@babel/plugin-proposal-optional-chaining": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1404,13 +1408,13 @@ } }, "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.17.12.tgz", - "integrity": "sha512-U0mI9q8pW5Q9EaTHFPwSVusPMV/DV9Mm8p7csqROFLtIE9rBF5piLqyrBGigftALrBcsBGu4m38JneAe7ZDLXw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.17.12", - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1420,13 +1424,13 @@ } }, "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.0.tgz", - "integrity": "sha512-t+8LsRMMDE74c6sV7KShIw13sqbqd58tlqNrsWoWBTIMw7SVQ0cZ905wLNS/FBCy/3PyooRHLFFlfrUNyyz5lA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.0", - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, "engines": { @@ -1437,12 +1441,12 @@ } }, "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", - "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-dynamic-import": "^7.8.3" }, "engines": { @@ -1453,12 +1457,12 @@ } }, "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.17.12.tgz", - "integrity": "sha512-j7Ye5EWdwoXOpRmo5QmRyHPsDIe6+u70ZYZrd7uz+ebPYFKfRcLcNu3Ro0vOlJ5zuv8rU7xa+GttNiRzX56snQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz", + "integrity": "sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" }, "engines": { @@ -1469,12 +1473,12 @@ } }, "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.17.12.tgz", - "integrity": "sha512-rKJ+rKBoXwLnIn7n6o6fulViHMrOThz99ybH+hKHcOZbnN14VuMnH9fo2eHE69C8pO4uX1Q7t2HYYIDmv8VYkg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-json-strings": "^7.8.3" }, "engines": { @@ -1485,12 +1489,12 @@ } }, "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.17.12.tgz", - "integrity": "sha512-EqFo2s1Z5yy+JeJu7SFfbIUtToJTVlC61/C7WLKDntSw4Sz6JNAIfL7zQ74VvirxpjB5kz/kIx0gCcb+5OEo2Q==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz", + "integrity": "sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" }, "engines": { @@ -1501,12 +1505,12 @@ } }, "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.17.12.tgz", - "integrity": "sha512-ws/g3FSGVzv+VH86+QvgtuJL/kR67xaEIF2x0iPqdDfYW6ra6JF3lKVBkWynRLcNtIC1oCTfDRVxmm2mKzy+ag==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" }, "engines": { @@ -1517,12 +1521,12 @@ } }, "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", - "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-numeric-separator": "^7.10.4" }, "engines": { @@ -1533,16 +1537,16 @@ } }, "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.0.tgz", - "integrity": "sha512-nbTv371eTrFabDfHLElkn9oyf9VG+VKK6WMzhY2o4eHKaG19BToD9947zzGMO6I/Irstx9d8CwX6njPNIAR/yw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz", + "integrity": "sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.17.10", - "@babel/helper-compilation-targets": "^7.17.10", - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/compat-data": "^7.18.6", + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.17.12" + "@babel/plugin-transform-parameters": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1552,12 +1556,12 @@ } }, "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", - "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" }, "engines": { @@ -1568,13 +1572,13 @@ } }, "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.17.12.tgz", - "integrity": "sha512-7wigcOs/Z4YWlK7xxjkvaIw84vGhDv/P1dFGQap0nHkc8gFKY/r+hXc8Qzf5k1gY7CvGIcHqAnOagVKJJ1wVOQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz", + "integrity": "sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", "@babel/plugin-syntax-optional-chaining": "^7.8.3" }, "engines": { @@ -1585,13 +1589,13 @@ } }, "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.17.12.tgz", - "integrity": "sha512-SllXoxo19HmxhDWm3luPz+cPhtoTSKLJE9PXshsfrOzBqs60QP0r8OaJItrPhAj0d7mZMnNF0Y1UUggCDgMz1A==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", "dev": true, "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.17.12", - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1601,14 +1605,14 @@ } }, "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.17.12.tgz", - "integrity": "sha512-/6BtVi57CJfrtDNKfK5b66ydK2J5pXUKBKSPD2G1whamMuEnZWgoOIfO8Vf9F/DoD4izBLD/Au4NMQfruzzykg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", + "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-create-class-features-plugin": "^7.17.12", - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "engines": { @@ -1619,25 +1623,25 @@ } }, "node_modules/@babel/plugin-proposal-private-property-in-object/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.17.12.tgz", - "integrity": "sha512-Wb9qLjXf3ZazqXA7IvI7ozqRIXIGPtSo+L5coFmEkhTQK18ao4UDDD0zdTGAarmbLj2urpRwrc6893cu5Bfh0A==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.17.12", - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=4" @@ -1848,12 +1852,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz", - "integrity": "sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", + "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1863,12 +1867,12 @@ } }, "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.17.12.tgz", - "integrity": "sha512-PHln3CNi/49V+mza4xMwrg+WGYevSF1oaiXaC2EQfdp4HWlSjRsrDXWJiQBKpP7749u6vQ9mcry2uuFOv5CXvA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", + "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1895,12 +1899,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", - "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1910,12 +1914,12 @@ } }, "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.4.tgz", - "integrity": "sha512-+Hq10ye+jlvLEogSOtq4mKvtk7qwcUQ1f0Mrueai866C82f844Yom2cttfJdMdqRLTxWpsbfbkIkOIfovyUQXw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz", + "integrity": "sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1925,18 +1929,18 @@ } }, "node_modules/@babel/plugin-transform-classes": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.4.tgz", - "integrity": "sha512-e42NSG2mlKWgxKUAD9EJJSkZxR67+wZqzNxLSpc51T8tRU5SLFHsPmgYR5yr7sdgX4u+iHA1C5VafJ6AyImV3A==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-replace-supers": "^7.18.2", - "@babel/helper-split-export-declaration": "^7.16.7", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.6.tgz", + "integrity": "sha512-XTg8XW/mKpzAF3actL554Jl/dOYoJtv3l8fxaEczpgz84IeeVf+T1u2CSvPHuZbt0w3JkIx4rdn/MRQI7mo0HQ==", + "dev": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", "globals": "^11.1.0" }, "engines": { @@ -1947,24 +1951,24 @@ } }, "node_modules/@babel/plugin-transform-classes/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.17.12.tgz", - "integrity": "sha512-a7XINeplB5cQUWMg1E/GI1tFz3LfK021IjV1rj1ypE+R7jHm+pIHmHl25VNkZxtx9uuYp7ThGk8fur1HHG7PgQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz", + "integrity": "sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1974,12 +1978,12 @@ } }, "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.0.tgz", - "integrity": "sha512-Mo69klS79z6KEfrLg/1WkmVnB8javh75HX4pi2btjvlIoasuxilEyjtsQW6XPrubNd7AQy0MMaNIaQE4e7+PQw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz", + "integrity": "sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -1989,13 +1993,13 @@ } }, "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", - "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2005,12 +2009,12 @@ } }, "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.17.12.tgz", - "integrity": "sha512-EA5eYFUG6xeerdabina/xIoB95jJ17mAkR8ivx6ZSu9frKShBjpOGZPn511MTDTkiCO+zXnzNczvUM69YSf3Zw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz", + "integrity": "sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2020,13 +2024,13 @@ } }, "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", - "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", "dev": true, "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2036,12 +2040,12 @@ } }, "node_modules/@babel/plugin-transform-for-of": { - "version": "7.18.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.1.tgz", - "integrity": "sha512-+TTB5XwvJ5hZbO8xvl2H4XaMDOAK57zF4miuC9qQJgysPNEAZZ9Z69rdF5LJkozGdZrjBIUAIyKUWRMmebI7vg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.6.tgz", + "integrity": "sha512-WAjoMf4wIiSsy88KmG7tgj2nFdEK7E46tArVtcgED7Bkj6Fg/tG5SbvNIOKxbFS2VFgNh6+iaPswBeQZm4ox8w==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2051,14 +2055,14 @@ } }, "node_modules/@babel/plugin-transform-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", - "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz", + "integrity": "sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA==", "dev": true, "dependencies": { - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2068,12 +2072,12 @@ } }, "node_modules/@babel/plugin-transform-literals": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.17.12.tgz", - "integrity": "sha512-8iRkvaTjJciWycPIZ9k9duu663FT7VrBdNqNgxnVXEFwOIp55JWcZd23VBRySYbnS3PwQ3rGiabJBBBGj5APmQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz", + "integrity": "sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2083,12 +2087,12 @@ } }, "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", - "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2098,13 +2102,13 @@ } }, "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.0.tgz", - "integrity": "sha512-h8FjOlYmdZwl7Xm2Ug4iX2j7Qy63NANI+NQVWQzv6r25fqgg7k2dZl03p95kvqNclglHs4FZ+isv4p1uXMA+QA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", + "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.18.0", - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -2115,14 +2119,14 @@ } }, "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.2.tgz", - "integrity": "sha512-f5A865gFPAJAEE0K7F/+nm5CmAE3y8AWlMBG9unu5j9+tk50UQVK0QS8RNxSp7MJf0wh97uYyLWt3Zvu71zyOQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", + "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.18.0", - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-simple-access": "^7.18.2", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -2133,15 +2137,15 @@ } }, "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.4.tgz", - "integrity": "sha512-lH2UaQaHVOAeYrUUuZ8i38o76J/FnO8vu21OE+tD1MyP9lxdZoSfz+pDbWkq46GogUrdrMz3tiz/FYGB+bVThg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz", + "integrity": "sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g==", "dev": true, "dependencies": { - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-module-transforms": "^7.18.0", - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" }, "engines": { @@ -2152,13 +2156,13 @@ } }, "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.0.tgz", - "integrity": "sha512-d/zZ8I3BWli1tmROLxXLc9A6YXvGK8egMxHp+E/rRwMh1Kip0AP77VwZae3snEJ33iiWwvNv2+UIIhfalqhzZA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", "dev": true, "dependencies": { - "@babel/helper-module-transforms": "^7.18.0", - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2168,13 +2172,13 @@ } }, "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.17.12.tgz", - "integrity": "sha512-vWoWFM5CKaTeHrdUJ/3SIOTRV+MBVGybOC9mhJkaprGNt5demMymDW24yC74avb915/mIRe3TgNb/d8idvnCRA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", + "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.17.12", - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2184,12 +2188,12 @@ } }, "node_modules/@babel/plugin-transform-new-target": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.17.12.tgz", - "integrity": "sha512-CaOtzk2fDYisbjAD4Sd1MTKGVIpRtx9bWLyj24Y/k6p4s4gQ3CqDGJauFJxt8M/LEx003d0i3klVqnN73qvK3w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2199,13 +2203,13 @@ } }, "node_modules/@babel/plugin-transform-object-super": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", - "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2215,12 +2219,12 @@ } }, "node_modules/@babel/plugin-transform-parameters": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.17.12.tgz", - "integrity": "sha512-6qW4rWo1cyCdq1FkYri7AHpauchbGLXpdwnYsfxFb+KtddHENfsY5JZb35xUwkK5opOLcJ3BNd2l7PhRYGlwIA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.6.tgz", + "integrity": "sha512-FjdqgMv37yVl/gwvzkcB+wfjRI8HQmc5EgOG9iGNvUY1ok+TjsoaMP7IqCDZBhkFcM5f3OPVMs6Dmp03C5k4/A==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2230,12 +2234,12 @@ } }, "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", - "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2245,12 +2249,12 @@ } }, "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.0.tgz", - "integrity": "sha512-C8YdRw9uzx25HSIzwA7EM7YP0FhCe5wNvJbZzjVNHHPGVcDJ3Aie+qGYYdS1oVQgn+B3eAIJbWFLrJ4Jipv7nw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", + "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-plugin-utils": "^7.18.6", "regenerator-transform": "^0.15.0" }, "engines": { @@ -2261,12 +2265,12 @@ } }, "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.17.12.tgz", - "integrity": "sha512-1KYqwbJV3Co03NIi14uEHW8P50Md6KqFgt0FfpHdK6oyAHQVTosgPuPSiWud1HX0oYJ1hGRRlk0fP87jFpqXZA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2305,12 +2309,12 @@ } }, "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", - "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2320,13 +2324,13 @@ } }, "node_modules/@babel/plugin-transform-spread": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.17.12.tgz", - "integrity": "sha512-9pgmuQAtFi3lpNUstvG9nGfk9DkrdmWNp9KeKPFmuZCpEnxRzYlS8JgwPjYj+1AWDOSvoGN0H30p1cBOmT/Svg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz", + "integrity": "sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2336,12 +2340,12 @@ } }, "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", - "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2351,12 +2355,12 @@ } }, "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.2.tgz", - "integrity": "sha512-/cmuBVw9sZBGZVOMkpAEaVLwm4JmK2GZ1dFKOGGpMzEHWFmyZZ59lUU0PdRr8YNYeQdNzTDwuxP2X2gzydTc9g==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz", + "integrity": "sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2366,12 +2370,12 @@ } }, "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.17.12.tgz", - "integrity": "sha512-Q8y+Jp7ZdtSPXCThB6zjQ74N3lj0f6TDh1Hnf5B+sYlzQ8i5Pjp8gW0My79iekSpT4WnI06blqP6DT0OmaXXmw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz", + "integrity": "sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2381,12 +2385,12 @@ } }, "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", - "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz", + "integrity": "sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2396,13 +2400,13 @@ } }, "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", - "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", "dev": true, "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" @@ -2536,9 +2540,9 @@ } }, "node_modules/@babel/runtime-corejs3": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.3.tgz", - "integrity": "sha512-l4ddFwrc9rnR+EJsHsh+TJ4A35YqQz/UqcjtlX2ov53hlJYG5CxtQmNZxyajwDVmCxwy++rtvGU5HazCK4W41Q==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.6.tgz", + "integrity": "sha512-cOu5wH2JFBgMjje+a+fz2JNIWU4GzYpl05oSob3UDvBEh6EuIn+TXFHMmBbhSb+k/4HMzgKCQfEEDArAWNF9Cw==", "dev": true, "dependencies": { "core-js-pure": "^3.20.2", @@ -2563,19 +2567,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", - "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.2", - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.2", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.6.tgz", + "integrity": "sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -2584,13 +2588,13 @@ } }, "node_modules/@babel/traverse/node_modules/@babel/generator": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", - "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", + "version": "7.18.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz", + "integrity": "sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==", "dev": true, "dependencies": { - "@babel/types": "^7.18.2", - "@jridgewell/gen-mapping": "^0.3.0", + "@babel/types": "^7.18.7", + "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" }, "engines": { @@ -2598,12 +2602,12 @@ } }, "node_modules/@babel/types": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz", - "integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==", + "version": "7.18.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.7.tgz", + "integrity": "sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-validator-identifier": "^7.18.6", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2883,9 +2887,9 @@ } }, "node_modules/@commitlint/load/node_modules/typescript": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.3.tgz", - "integrity": "sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -3393,9 +3397,9 @@ } }, "node_modules/@ethersproject/abi": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.6.3.tgz", - "integrity": "sha512-CxKTdoZY4zDJLWXG6HzNH6znWK0M79WzzxHegDoecE3+K32pzfHOzuXg2/oGSTecZynFgpkjYXNPOqXVJlqClw==", + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.6.4.tgz", + "integrity": "sha512-TTeZUlCeIHG6527/2goZA6gW5F8Emoc7MrZDC7hhP84aRGvW3TEdTnZR08Ls88YXM1m2SuK42Osw/jSi3uO8gg==", "funding": [ { "type": "individual", @@ -3730,9 +3734,9 @@ ] }, "node_modules/@ethersproject/networks": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.3.tgz", - "integrity": "sha512-QZxRH7cA5Ut9TbXwZFiCyuPchdWi87ZtVNHWZd0R6YFgYtes2jQ3+bsslJ0WdyDe0i6QumqtoYqvY3rrQFRZOQ==", + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.4.tgz", + "integrity": "sha512-KShHeHPahHI2UlWdtDMn2lJETcbtaJge4k7XSjDR9h79QTd6yQJmv6Cp2ZA4JdqWnhszAOLSuJEd9C0PRw7hSQ==", "funding": [ { "type": "individual", @@ -4073,14 +4077,14 @@ } }, "node_modules/@firebase/analytics": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.7.9.tgz", - "integrity": "sha512-h/2L2q4/+mmV9EdvVC3XwFFbKSh8bvaYu4DMJIKnPAuGze6W5ALBLkK2GcVti6Kz1NTMJ3puxTRWE9XxRGZipQ==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.7.11.tgz", + "integrity": "sha512-rEGBmZdvD+biSAcMztrIftc/vS8Wgexau8Ok2aFqo3n3IkKDdBq2tdhh6tXsugBt755+q56HGQOHRWboaqG3LQ==", + "dependencies": { + "@firebase/component": "0.5.16", + "@firebase/installations": "0.5.11", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4088,14 +4092,14 @@ } }, "node_modules/@firebase/analytics-compat": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.1.10.tgz", - "integrity": "sha512-7zfB+BBO5RbF7RSHOA4ZPyLvOEEvMOhRbfIjh5ZmizAQY2J6tZB8t+dwQ/q4hqZVGgw4ds4g0JYuRKZKYsWADg==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.1.12.tgz", + "integrity": "sha512-mXR02p/4C9Xx07prhzr9nwocH6Xn3vpcO7DMGUMNB0qKdJADOaBow6LDlDY3u8ILhmHqNS8qPY3sKnhoTWzz8A==", "dependencies": { - "@firebase/analytics": "0.7.9", + "@firebase/analytics": "0.7.11", "@firebase/analytics-types": "0.7.0", - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4108,25 +4112,25 @@ "integrity": "sha512-DNE2Waiwy5+zZnCfintkDtBfaW6MjIG883474v6Z0K1XZIvl76cLND4iv0YUb48leyF+PJK1KO2XrgHb/KpmhQ==" }, "node_modules/@firebase/app": { - "version": "0.7.25", - "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.7.25.tgz", - "integrity": "sha512-OemDA3NZS1oEbAPFlWHeVI8Od26ZHAXUivUWFYIsYrw+YjS7FloltwyHB06Q8LQyPJIBPubGkEuzNTHz32EDCQ==", + "version": "0.7.27", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.7.27.tgz", + "integrity": "sha512-gLxy9wHymCsPAWuIWg2S/gOWoAN/Nbpto+IWSXPHzjVUtPRvmuBrr9rvh8D2V2zHxNb1WigoZVLy5acRAf2rHg==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "idb": "7.0.1", "tslib": "^2.1.0" } }, "node_modules/@firebase/app-check": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.5.8.tgz", - "integrity": "sha512-DgrXnrJT0S5csa5CsvmWWSWqy61T3rOE2iZ/L4Q8+xZsjU2McpUj8g/lU8NDa4qc5mGRZ/Qjozqog1H3pwPgGw==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.5.10.tgz", + "integrity": "sha512-q/rpvhPBU7utREWTlsw+Nr9aZAHKZieF9o/6EJkymqFvWDDmvN+hycKidKWwJ2OcnUYjOr7GuvWUEAfw8X8/tQ==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4134,15 +4138,15 @@ } }, "node_modules/@firebase/app-check-compat": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.2.8.tgz", - "integrity": "sha512-EAqFa0juE2xc52IGh2nv8E+avTLsZfbO7fkJnhPu07e5FU39pptcsRckTdHU7v1/DuWuigUVFcOD5iic9I8TQw==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.2.10.tgz", + "integrity": "sha512-NNxroiY3BVaEGkKs8W4dzv2WnJ4PbeBL7DpF1MlRHEZHa/48YPZv8xKx3QcKbH0T+31s7ponPYnRYsNY+j4CaA==", "dependencies": { - "@firebase/app-check": "0.5.8", + "@firebase/app-check": "0.5.10", "@firebase/app-check-types": "0.4.0", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4160,14 +4164,14 @@ "integrity": "sha512-SsWafqMABIOu7zLgWbmwvHGOeQQVQlwm42kwwubsmfLmL4Sf5uGpBfDhQ0CAkpi7bkJ/NwNFKafNDL9prRNP0Q==" }, "node_modules/@firebase/app-compat": { - "version": "0.1.26", - "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.1.26.tgz", - "integrity": "sha512-i5UTq1HZAHuhe7RNjgFSezbow4jVxc2oe3Gndsv+Hdut92f8L0AyssOtdU2iOylLlxbTijewAXXui4FAUzXubw==", + "version": "0.1.28", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.1.28.tgz", + "integrity": "sha512-yo1A32zMSaFv+hG9XcSkquA1GD8ph+Hx6hxOp8XQjtzkXA+TJzA0ehvDp1YCL6owBXn9RXphUC6mofPdDEFJKQ==", "dependencies": { - "@firebase/app": "0.7.25", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/app": "0.7.27", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, @@ -4177,13 +4181,13 @@ "integrity": "sha512-6fbHQwDv2jp/v6bXhBw2eSRbNBpxHcd1NBF864UksSMVIqIyri9qpJB1Mn6sGZE+bnDsSQBC5j2TbMxYsJQkQg==" }, "node_modules/@firebase/auth": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.20.2.tgz", - "integrity": "sha512-anv2dhHXnlHSuXDuXIoCm/w/JJ+SiQ1TAKgNVYlhfq+yvx9Op8CxfTqcfBwfbIZ1gizw4PNLuk82m8KelsKl6Q==", + "version": "0.20.4", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.20.4.tgz", + "integrity": "sha512-pWIrPB635QpPPbr7GFt2JMvSu/+Mgz/wLnMMrX3hHaPl4UlRLKdycohPSIZF+EGgc7PLx6p9fJvcw1fGEFZNXQ==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "node-fetch": "2.6.7", "selenium-webdriver": "4.1.2", "tslib": "^2.1.0" @@ -4193,14 +4197,14 @@ } }, "node_modules/@firebase/auth-compat": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.2.15.tgz", - "integrity": "sha512-Kl8pujKWVBJ+76h4tRsS5xI9Dvk8MVSP6eN82rnEgmCxiUsnVj5Adb/WzvS3p4/l++4mRSAEnlIVxZ2Pyaeirg==", + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.2.17.tgz", + "integrity": "sha512-GlEnDjziTEbFKqdILugBis9ZaQx57Y7bz5Uk41c793BusGXOgcZdrqjjM3DpNKPWBvi58rNbP0FdcAZA7DsWTw==", "dependencies": { - "@firebase/auth": "0.20.2", + "@firebase/auth": "0.20.4", "@firebase/auth-types": "0.11.0", - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/util": "1.6.2", "node-fetch": "2.6.7", "selenium-webdriver": "4.1.2", "tslib": "^2.1.0" @@ -4228,61 +4232,58 @@ } }, "node_modules/@firebase/component": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.5.14.tgz", - "integrity": "sha512-ct2p1MTMV5P/nGIlkC3XjAVwHwjsIZaeo8JVyDAkJCNTROu5mYX3FBK16hjIUIIVJDpgnnzFh9nP74gciL4WrA==", + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.5.16.tgz", + "integrity": "sha512-/pkl77mN9PT7dTSzNu1CrvIvd+z1CdePnEl+VITaeSBs9Ko7ZVvSIlzQLbSwqksXX3bAHpxej0Mg6mVKQiRVSw==", "dependencies": { - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, "node_modules/@firebase/database": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.13.0.tgz", - "integrity": "sha512-lskyf5+FDnytrPJt3MLjkTDxYxutKtaYL7j/Z/De2DSVZJSR+weE/D/r47iK/+tyzMaew2v3joSgZOHvVlWshw==", + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.13.2.tgz", + "integrity": "sha512-wKkBD4rq6PPv9gl1hNJNpl0R0bwJmXCJfDuvotjXmTcU7kV0AIaJ45GVhULkbSCApAAFC6QUJ91oasDUO1ZVxw==", "dependencies": { "@firebase/auth-interop-types": "0.1.6", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "faye-websocket": "0.11.4", "tslib": "^2.1.0" } }, "node_modules/@firebase/database-compat": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.2.0.tgz", - "integrity": "sha512-t2HVI1RrMz8cbmhyo2LQGSInhRN9DZTDKXm55iFQgSihcnCbfoMAFyRv/FFa1Y+iERgcDI8LaOMS/LTjpYVz4g==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/database": "0.13.0", - "@firebase/database-types": "0.9.8", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.2.2.tgz", + "integrity": "sha512-3wLHJ54WHMhrveCywCMbkspshFezN07PLOIsmqELM1+pmrg3bwMj9u/o3Equ0DwmESMnchp5sMxgzdBUOextJg==", + "dependencies": { + "@firebase/component": "0.5.16", + "@firebase/database": "0.13.2", + "@firebase/database-types": "0.9.10", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" - }, - "peerDependencies": { - "@firebase/app-compat": "0.x" } }, "node_modules/@firebase/database-types": { - "version": "0.9.8", - "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.9.8.tgz", - "integrity": "sha512-bI7bwF5xc0nPi6Oa3JVt6JJdfhVAnEpCwgfTNILR4lYDPtxdxlRXhZzQ5lfqlCj7PR+drKh9RvMu6C24N1q04w==", + "version": "0.9.10", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.9.10.tgz", + "integrity": "sha512-2ji6nXRRsY+7hgU6zRhUtK0RmSjVWM71taI7Flgaw+BnopCo/lDF5HSwxp8z7LtiHlvQqeRA3Ozqx5VhlAbiKg==", "dependencies": { "@firebase/app-types": "0.7.0", - "@firebase/util": "1.6.0" + "@firebase/util": "1.6.2" } }, "node_modules/@firebase/firestore": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.4.9.tgz", - "integrity": "sha512-EiSG/uYDyUmrrHlwrsP9WqWI8ChD0hUW/+0MS3NDh8Cfo1Dfb/sM3YWKzgnIZ3wKTxn/nbe9oidHZp5cqI9G+w==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", - "@firebase/webchannel-wrapper": "0.6.1", + "version": "3.4.11", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.4.11.tgz", + "integrity": "sha512-ZobzP2fQNiqT9Fh5x/8CmQVsWr3JJaM4l0xGHyaPc7vneRRC0Y0KcuKg3z3jBUXItXvlsIj7mGM4FucrxwhPzQ==", + "dependencies": { + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", + "@firebase/webchannel-wrapper": "0.6.2", "@grpc/grpc-js": "^1.3.2", "@grpc/proto-loader": "^0.6.0", "node-fetch": "2.6.7", @@ -4296,14 +4297,14 @@ } }, "node_modules/@firebase/firestore-compat": { - "version": "0.1.18", - "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.1.18.tgz", - "integrity": "sha512-D6VXudL/B2jlZ6MGpsDPHHm/DSpfKuUOnEb5wwH89Sw0nW5snSMNG8QfYTQYKUxrX35ma+nWUnaa18LlVTUMXQ==", + "version": "0.1.20", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.1.20.tgz", + "integrity": "sha512-0+WAh+pjCi0t/DK5cefECiwQGiZbrAU2UenZ61Uly1w7L5ob932Qc61OQKk+Y2VD+IQ7YPcBpUM7X6JOSbgJ6g==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/firestore": "3.4.9", + "@firebase/component": "0.5.16", + "@firebase/firestore": "3.4.11", "@firebase/firestore-types": "2.5.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4320,15 +4321,15 @@ } }, "node_modules/@firebase/functions": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.8.1.tgz", - "integrity": "sha512-UF5187TPn1Q1sFmAUU1oZdKub1t0Z6MAjcskGS6CV4OwAkILZQ9v38LIbo3wnA62R5hr3IFpdEJxKkqHojMwSg==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.8.3.tgz", + "integrity": "sha512-0mc59I97S61fvDiVhqj/k5GwSDM/mSWe+xgyxT1UWD3vocvZ5JOx0bhPwbpa7lStI6DWCiWhZrEQlp16Y7i1yg==", "dependencies": { "@firebase/app-check-interop-types": "0.1.0", "@firebase/auth-interop-types": "0.1.6", - "@firebase/component": "0.5.14", + "@firebase/component": "0.5.16", "@firebase/messaging-interop-types": "0.1.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "node-fetch": "2.6.7", "tslib": "^2.1.0" }, @@ -4337,14 +4338,14 @@ } }, "node_modules/@firebase/functions-compat": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.2.1.tgz", - "integrity": "sha512-1epI+TGb3CxpQrnoSJnKMUqBLn9b6KA1Rro6ISmZIEkaDEi8p8q3UI917XP+OewiPG71xvpySiEIIxWyktcl+A==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.2.3.tgz", + "integrity": "sha512-we6a5a6HcCwLMXzITNWfvBxxIlCqcXCeUsomEb0Gyf1/ecVod8L3dcsWNTZB87OYjTSpVS+Jn+H+NpjOMvrlmA==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/functions": "0.8.1", + "@firebase/component": "0.5.16", + "@firebase/functions": "0.8.3", "@firebase/functions-types": "0.5.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4357,12 +4358,12 @@ "integrity": "sha512-qza0M5EwX+Ocrl1cYI14zoipUX4gI/Shwqv0C1nB864INAD42Dgv4v94BCyxGHBg2kzlWy8PNafdP7zPO8aJQA==" }, "node_modules/@firebase/installations": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.5.9.tgz", - "integrity": "sha512-0XvF9ig8Zj7MWP4Aq5/Wcyjq9f/cDtD6DKFJhp3BT1AjmACdmq7WD72xok8UBhkOiqymIiGd5eQf7rX225D2Sw==", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.5.11.tgz", + "integrity": "sha512-54pTWQXYHBNlwUwtHDitr/N4dFOBi/LYoBlpbyIrjlqdkXSk0WOVDMV15cMdfCyCZQgJVMW78c52ZrDZxwW05g==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/util": "1.6.2", "idb": "7.0.1", "tslib": "^2.1.0" }, @@ -4371,22 +4372,22 @@ } }, "node_modules/@firebase/logger": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.3.2.tgz", - "integrity": "sha512-lzLrcJp9QBWpo40OcOM9B8QEtBw2Fk1zOZQdvv+rWS6gKmhQBCEMc4SMABQfWdjsylBcDfniD1Q+fUX1dcBTXA==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.3.3.tgz", + "integrity": "sha512-POTJl07jOKTOevLXrTvJD/VZ0M6PnJXflbAh5J9VGkmtXPXNG6MdZ9fmRgqYhXKTaDId6AQenQ262uwgpdtO0Q==", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/@firebase/messaging": { - "version": "0.9.13", - "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.9.13.tgz", - "integrity": "sha512-wR/SGYGG/bmz1gRqm6/eGI6zRg/X3qNP0BCk0Oa6xVDKK04UCE9zNRgQYgCSKNP+zuLfDhpHbXvvXQp9/vBYVA==", + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.9.15.tgz", + "integrity": "sha512-UEMbjj3UdsHipdljrFMNyasYLPzEOLXRfaZdpV7StHuqa5r3M9jKRM16tcszNMWXVNuiXT4k0VPXXGZPtiYQDQ==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", + "@firebase/component": "0.5.16", + "@firebase/installations": "0.5.11", "@firebase/messaging-interop-types": "0.1.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "idb": "7.0.1", "tslib": "^2.1.0" }, @@ -4395,13 +4396,13 @@ } }, "node_modules/@firebase/messaging-compat": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.1.13.tgz", - "integrity": "sha512-kGuzjpl+pcTRmEgGDjyOKQnxxQgC7wIJIIHhLMIpfxHHL5+ysN1Tjq0Ztr1t/gcdHKErtnD/n9To5eoGZHqpzA==", + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.1.15.tgz", + "integrity": "sha512-f9xbp/V4onNgg7tTC9rY/9gb5F3S+1m1YMU39GHATXcoO4qVCN429VFbVSWQ9RI7f85HddPsULWX7Moq+MwzNw==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/messaging": "0.9.13", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/messaging": "0.9.15", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4414,14 +4415,14 @@ "integrity": "sha512-DbvUl/rXAZpQeKBnwz0NYY5OCqr2nFA0Bj28Fmr3NXGqR4PAkfTOHuQlVtLO1Nudo3q0HxAYLa68ZDAcuv2uKQ==" }, "node_modules/@firebase/performance": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.5.9.tgz", - "integrity": "sha512-cA1pea1hkIZt0FG0a42tjKQNBhdY7q4apqHML92vBCS9QOOR0SHBui44IGQJRfRBGiVICHW03Q+ikSZv08g+jw==", - "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.5.11.tgz", + "integrity": "sha512-neHlHi1bs0LkNCZgzSWBm+YBqkaKFkxj+JtD4E4EQTENdHsAAAL4JnSKPOP1c+4CQqDnRbYW9QMXPcDlL21pow==", + "dependencies": { + "@firebase/component": "0.5.16", + "@firebase/installations": "0.5.11", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4429,15 +4430,15 @@ } }, "node_modules/@firebase/performance-compat": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.1.9.tgz", - "integrity": "sha512-EBX4u/uK76ikJSyoWZ2cEMj63G01w1DA68KDpSypSMhKPJE2eiCtWABRTSXhcaisq/FDwZzl4XhNjDyfzArwhA==", + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.1.11.tgz", + "integrity": "sha512-M1paA6KG4j5OGvgpvg25Y6x5/lUIpSJVL6fyq4af3YjFcLoSijqiBq/KTiFEt3vLJWiOmK2p9Apu3MHiffBi0A==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/performance": "0.5.9", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/performance": "0.5.11", "@firebase/performance-types": "0.1.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4463,6 +4464,7 @@ "version": "3.6.5", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", "hasInstallScript": true, "funding": { "type": "opencollective", @@ -4470,14 +4472,14 @@ } }, "node_modules/@firebase/remote-config": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.3.8.tgz", - "integrity": "sha512-z5HYrjrgzkR25nlvQqiPowDGatlEJirA5sN1B6rOy+KYMLsb6IXLVOdKjj/Tg/uHAErwd0DblGxwBUZKTCuo1g==", + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.3.10.tgz", + "integrity": "sha512-n55NDxX9kt6QoDH0z3Ryjbjx/S6xNobfjK/hdMN/3fNZh0WSuAZKMWUiw/59cnbZkFxQBncOGDN5Cc/bdp3bdg==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/installations": "0.5.11", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4485,15 +4487,15 @@ } }, "node_modules/@firebase/remote-config-compat": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.1.9.tgz", - "integrity": "sha512-ud4yINy8cegE82KoBDXS4fOp6qwy0+7zl0k587kMXHSWHbWVRZ/uKMQGJQc7kG0EQp0tZhM20CxVwtcCGsABBA==", + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.1.11.tgz", + "integrity": "sha512-75mjt2M+MXa/j2J9wuRVrUFDekFoKkK5/ogBPxckvjzSXGDDwbGmrrb0MwG6BdUSxSUaHrAeUYhEQ2vwNfa1Gw==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/remote-config": "0.3.8", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/remote-config": "0.3.10", "@firebase/remote-config-types": "0.2.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4506,12 +4508,12 @@ "integrity": "sha512-hqK5sCPeZvcHQ1D6VjJZdW6EexLTXNMJfPdTwbD8NrXUw6UjWC4KWhLK/TSlL0QPsQtcKRkaaoP+9QCgKfMFPw==" }, "node_modules/@firebase/storage": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.9.6.tgz", - "integrity": "sha512-q8/s3qFbFl+AlKbyEtGA7FRVhcMu3NKPqHueBTn5XSI0B3bfxptBcDJMb9txs69ppve6P3jrK1//TEWpjTGJUg==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.9.8.tgz", + "integrity": "sha512-tfRDVjDjTDIBHm7CTFcboZ7UC+GUKkBIhmoHt2tTVyZfEDKtE4ZPnHy7i6RSeY624wM+/IGWn5o+1CCf3uEEGQ==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/util": "1.6.2", "node-fetch": "2.6.7", "tslib": "^2.1.0" }, @@ -4520,14 +4522,14 @@ } }, "node_modules/@firebase/storage-compat": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.1.14.tgz", - "integrity": "sha512-/Fey1n+ryIeAEyd/qXPXh32ReFZUhzE5W0z/+LDA+3yyMGw/a6wCzQqe7wBiGiCRhjd+5XiV++jkCXTflun3Dg==", + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.1.16.tgz", + "integrity": "sha512-YSK0QHPCyyALBiJHvtlejrmtrQKst7aJiHyEm1VkcyLdm5RMcZ6JkdObOeACxa9/qwATYQLNlwy/C+//RuzyrA==", "dependencies": { - "@firebase/component": "0.5.14", - "@firebase/storage": "0.9.6", + "@firebase/component": "0.5.16", + "@firebase/storage": "0.9.8", "@firebase/storage-types": "0.6.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" }, "peerDependencies": { @@ -4544,17 +4546,17 @@ } }, "node_modules/@firebase/util": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.6.0.tgz", - "integrity": "sha512-6+hhqb4Zzjoo12xofTDHPkgW3FnN4ydBsjd5X2KuQI268DR3W3Ld64W/gkKPZrKRgUxeNeb+pykfP3qRe7q+vA==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.6.2.tgz", + "integrity": "sha512-VYDqEf/+mS7n0nPj6qJDJYFtKIEfOaTtQeNDsd3x+xp8HWvrbygWOexzeGicLP1dvEzrKr3eQGcJmmmYN3TIsA==", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/@firebase/webchannel-wrapper": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.6.1.tgz", - "integrity": "sha512-9FqhNjKQWpQ3fGnSOCovHOm+yhhiorKEqYLAfd525jWavunDJcx8rOW6i6ozAh+FbwcYMkL7b+3j4UR/30MpoQ==" + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.6.2.tgz", + "integrity": "sha512-zThUKcqIU6utWzM93uEvhlh8qj8A5LMPFJPvk/ODb+8GSSif19xM2Lw1M2ijyBy8+6skSkQBbavPzOU5Oh/8tQ==" }, "node_modules/@graphql-typed-document-node/core": { "version": "3.1.1", @@ -5396,12 +5398,12 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.0", + "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.9" }, @@ -5419,24 +5421,24 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", + "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -5444,9 +5446,9 @@ } }, "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.8.tgz", + "integrity": "sha512-YK5G9LaddzGbcucK4c8h5tWFmMPBvRZ/uyWmN1/SbBdIvqGUdWGkJ5BAaccgs6XbzVLsqbPJrBSFwKv3kT9i7w==", "dev": true, "engines": { "node": ">=6.0.0" @@ -5466,9 +5468,9 @@ } }, "node_modules/@keplr-wallet/types": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.10.5.tgz", - "integrity": "sha512-CY1F+Rsfe2fs5uPioC1o80lKxQWsYHIwoILLptdebr2Sg1DjSuWVLHWScsB8EbBGm0LQQ9nQ+3LHklbsTNo2bw==", + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.10.9.tgz", + "integrity": "sha512-wp55NYX7joHfHV4huyVyvR2fOUcyTvJgbVsPz73+5ONPYk2WnhfdjCo2OxtuX4+B0Nu53vNgYSD6kn1nl4V3wg==", "dev": true, "dependencies": { "@cosmjs/launchpad": "^0.24.0-alpha.25", @@ -5667,21 +5669,21 @@ } }, "node_modules/@nrwl/cli": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-14.2.2.tgz", - "integrity": "sha512-LnIgs2kkCoVe4x2mDBhdMfD7yD1d0TteJKY6MO7V0NaMjUMiJHpFz2xGQQkre/UpcRHDCHd7xwYEN4J8auNfKQ==", + "version": "14.4.0", + "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-14.4.0.tgz", + "integrity": "sha512-Hmn+Yj7VTmaztOgTCe0kYtZkBsp6NGPfvbm27FTgcda5TsxCkrCLah6btuS7hcX+h4Ss308z9hFMfNk2EvVWXA==", "dev": true, "dependencies": { - "nx": "14.2.2" + "nx": "14.4.0" } }, "node_modules/@nrwl/cli/node_modules/@nrwl/tao": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-14.2.2.tgz", - "integrity": "sha512-FSqgsWEBJEVa70+crT20OqgI15XJjiy1x3fADx9hYFMQz/NYwQuFlmZG8xiZcRnEy2bOE6pdb5s6ThokjdE5XQ==", + "version": "14.4.0", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-14.4.0.tgz", + "integrity": "sha512-8PFM72SMWyhIPPeGpIJzzST/yfMAsf0zRKNfB90ra7FlHXXXzDZmpJvV8JpnCtSBGjT8OrcpZ8siD4JXov4ueA==", "dev": true, "dependencies": { - "nx": "14.2.2" + "nx": "14.4.0" }, "bin": { "tao": "index.js" @@ -5702,6 +5704,12 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/@nrwl/cli/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/@nrwl/cli/node_modules/chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -5778,6 +5786,18 @@ "node": ">=8" } }, + "node_modules/@nrwl/cli/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/@nrwl/cli/node_modules/minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", @@ -5791,14 +5811,14 @@ } }, "node_modules/@nrwl/cli/node_modules/nx": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/nx/-/nx-14.2.2.tgz", - "integrity": "sha512-7QXNhcC8FqoLuq7yCEXS6rrfWX/KgFZk+Q++Fg4MBXXnIJ3xR6Fd3Db5R2jSFodio++hzA92ZWe2R/TAftageg==", + "version": "14.4.0", + "resolved": "https://registry.npmjs.org/nx/-/nx-14.4.0.tgz", + "integrity": "sha512-YemgZ3NHmO5Ik0lruoSCoT5ORaUrcI7gpqtmI1SL8hSPJs4kg2hYevoIb6sE0CTsxuqDHFnRR8qhdPLcSgHGxQ==", "dev": true, "hasInstallScript": true, "dependencies": { - "@nrwl/cli": "14.2.2", - "@nrwl/tao": "14.2.2", + "@nrwl/cli": "14.4.0", + "@nrwl/tao": "14.4.0", "@parcel/watcher": "2.0.4", "chalk": "4.1.0", "chokidar": "^3.5.1", @@ -5813,6 +5833,7 @@ "fs-extra": "^10.1.0", "glob": "7.1.4", "ignore": "^5.0.4", + "js-yaml": "4.1.0", "jsonc-parser": "3.0.0", "minimatch": "3.0.5", "npm-run-path": "^4.0.1", @@ -6291,9 +6312,9 @@ } }, "node_modules/@testing-library/dom": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.13.0.tgz", - "integrity": "sha512-9VHgfIatKNXQNaZTtLnalIy0jNZzY35a4S3oi08YAt9Hv1VsfZ/DfA45lM8D/UhtHBGJ4/lGwp0PZkVndRkoOQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.14.0.tgz", + "integrity": "sha512-m8FOdUo77iMTwVRCyzWcqxlEIk+GnopbrRI15a0EaLbpZSCinIVI4kSQzWhkShK83GogvEFJSsHF3Ws0z1vrqA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.10.4", @@ -6583,18 +6604,18 @@ } }, "node_modules/@types/eslint": { - "version": "8.4.3", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.3.tgz", - "integrity": "sha512-YP1S7YJRMPs+7KZKDb9G63n8YejIwW9BALq7a5j2+H4yl6iOv9CB29edho+cuFRrvmJbbaH2yiVChKLJVysDGw==", + "version": "8.4.5", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz", + "integrity": "sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ==", "dependencies": { "@types/estree": "*", "@types/json-schema": "*" } }, "node_modules/@types/eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", "dependencies": { "@types/eslint": "*", "@types/estree": "*" @@ -7157,7 +7178,7 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, + "devOptional": true, "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -7373,7 +7394,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, + "devOptional": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -7449,7 +7470,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, + "devOptional": true, "dependencies": { "sprintf-js": "~1.0.2" } @@ -8087,7 +8108,7 @@ "node_modules/bcrypt-pbkdf/node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, "node_modules/bech32": { @@ -8126,7 +8147,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -8208,7 +8229,7 @@ "version": "1.20.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", - "dev": true, + "devOptional": true, "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.4", @@ -8232,7 +8253,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "devOptional": true, "dependencies": { "ms": "2.0.0" } @@ -8241,7 +8262,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.8" } @@ -8250,13 +8271,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "devOptional": true }, "node_modules/body-parser/node_modules/qs": { "version": "6.10.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "dev": true, + "devOptional": true, "dependencies": { "side-channel": "^1.0.4" }, @@ -8300,7 +8321,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, + "devOptional": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -8389,9 +8410,9 @@ "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" }, "node_modules/browserslist": { - "version": "4.20.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.4.tgz", - "integrity": "sha512-ok1d+1WpnU24XYN7oC3QWgTyMhY/avPJ/r9T00xxvUOIparA/gc+UPUMaod3i+G6s+nI2nUb9xZ5k794uIwShw==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.1.tgz", + "integrity": "sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ==", "funding": [ { "type": "opencollective", @@ -8403,11 +8424,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001349", - "electron-to-chromium": "^1.4.147", - "escalade": "^3.1.1", + "caniuse-lite": "^1.0.30001359", + "electron-to-chromium": "^1.4.172", "node-releases": "^2.0.5", - "picocolors": "^1.0.0" + "update-browserslist-db": "^1.0.4" }, "bin": { "browserslist": "cli.js" @@ -8530,7 +8550,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.8" } @@ -8667,9 +8687,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001352", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001352.tgz", - "integrity": "sha512-GUgH8w6YergqPQDGWhJGt8GDRnY0L/iJVQcU3eJ46GYf52R8tk0Wxp0PymuFVZboJYXGiCqwozAYZNRjVj6IcA==", + "version": "1.0.30001363", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz", + "integrity": "sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg==", "funding": [ { "type": "opencollective", @@ -8743,7 +8763,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, + "devOptional": true, "funding": [ { "type": "individual", @@ -8770,7 +8790,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">=10" } @@ -8784,9 +8804,9 @@ } }, "node_modules/ci-info": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", - "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", "dev": true }, "node_modules/cipher-base": { @@ -9114,9 +9134,9 @@ "dev": true }, "node_modules/colorette": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.17.tgz", - "integrity": "sha512-hJo+3Bkn0NCHybn9Tu35fIeoOKGOk5OCC32y4Hz2It+qlCO2Q3DeQ1hRn/tDDMQKRYUEzqsl7jbF6dYKjlE60g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, "node_modules/colorspace": { @@ -9153,7 +9173,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 6" } @@ -9273,7 +9293,7 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, + "devOptional": true, "dependencies": { "safe-buffer": "5.2.1" }, @@ -9285,7 +9305,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -9356,7 +9376,7 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -9365,7 +9385,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true + "devOptional": true }, "node_modules/copy-anything": { "version": "2.0.6", @@ -9478,6 +9498,7 @@ "version": "3.16.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.16.0.tgz", "integrity": "sha512-5+5VxRFmSf97nM8Jr2wzOwLqRo6zphH2aX+7KsAUONObyzakDNq2G/bgbhinxB4PoV9L3aXQYhiDKyIKWd2c8g==", + "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", "dev": true, "hasInstallScript": true, "funding": { @@ -9486,12 +9507,12 @@ } }, "node_modules/core-js-compat": { - "version": "3.22.8", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.22.8.tgz", - "integrity": "sha512-pQnwg4xtuvc2Bs/5zYQPaEYYSuTxsF7LBWF0SvnVhthZo/Qe+rJpcEekrdNK5DWwDJ0gv0oI9NNX5Mppdy0ctg==", + "version": "3.23.3", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.3.tgz", + "integrity": "sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw==", "dev": true, "dependencies": { - "browserslist": "^4.20.3", + "browserslist": "^4.21.0", "semver": "7.0.0" }, "funding": { @@ -9509,9 +9530,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.22.8", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.22.8.tgz", - "integrity": "sha512-bOxbZIy9S5n4OVH63XaLVXZ49QKicjowDx/UELyJ68vxfCRpYsbyh/WNZNfEfAk+ekA8vSjt+gCDpvh672bc3w==", + "version": "3.23.3", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.23.3.tgz", + "integrity": "sha512-XpoouuqIj4P+GWtdyV8ZO3/u4KftkeDVMfvp+308eGMhCrA3lVDSmAxO0c6GGOcmgVlaKDrgWVMo49h2ab/TDA==", "dev": true, "hasInstallScript": true, "funding": { @@ -9674,7 +9695,7 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, + "devOptional": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -9783,9 +9804,9 @@ } }, "node_modules/css-declaration-sorter": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.2.2.tgz", - "integrity": "sha512-Ufadglr88ZLsrvS11gjeu/40Lw74D9Am/Jpr3LlYm5Q4ZP5KdlUhG+6u2EjyXeZcxmZ2h1ebCKngDjolpeLHpg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.0.tgz", + "integrity": "sha512-OGT677UGHJTAVMRhPO+HJ4oKln3wkBTwtDFH0ojbqm+MJm6xuDMHp2nkhh/ThaBqq20IbraBQSWKfSLNHQO9Og==", "dev": true, "engines": { "node": "^10 || ^12 || >=14" @@ -10139,12 +10160,12 @@ } }, "node_modules/cssnano": { - "version": "5.1.11", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.11.tgz", - "integrity": "sha512-2nx+O6LvewPo5EBtYrKc8762mMkZRk9cMGIOP4UlkmxHm7ObxH+zvsJJ+qLwPkUc4/yumL/qJkavYi9NlodWIQ==", + "version": "5.1.12", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.12.tgz", + "integrity": "sha512-TgvArbEZu0lk/dvg2ja+B7kYoD7BBCmn3+k58xD0qjrGHsFzXY/wKTo9M5egcUCabPol05e/PVoIu79s2JN4WQ==", "dev": true, "dependencies": { - "cssnano-preset-default": "^5.2.11", + "cssnano-preset-default": "^5.2.12", "lilconfig": "^2.0.3", "yaml": "^1.10.2" }, @@ -10160,12 +10181,12 @@ } }, "node_modules/cssnano-preset-default": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.11.tgz", - "integrity": "sha512-4PadR1NtuaIK8MvLNuY7MznK4WJteldGlzCiMaaTiOUP+apeiIvUDIXykzUOoqgOOUAHrU64ncdD90NfZR3LSQ==", + "version": "5.2.12", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.12.tgz", + "integrity": "sha512-OyCBTZi+PXgylz9HAA5kHyoYhfGcYdwFmyaJzWnzxuGRtnMw/kR6ilW9XzlzlRAtB6PLT/r+prYgkef7hngFew==", "dev": true, "dependencies": { - "css-declaration-sorter": "^6.2.2", + "css-declaration-sorter": "^6.3.0", "cssnano-utils": "^3.1.0", "postcss-calc": "^8.2.3", "postcss-colormin": "^5.3.0", @@ -10174,7 +10195,7 @@ "postcss-discard-duplicates": "^5.1.0", "postcss-discard-empty": "^5.1.1", "postcss-discard-overridden": "^5.1.0", - "postcss-merge-longhand": "^5.1.5", + "postcss-merge-longhand": "^5.1.6", "postcss-merge-rules": "^5.1.2", "postcss-minify-font-values": "^5.1.0", "postcss-minify-gradients": "^5.1.1", @@ -10182,14 +10203,14 @@ "postcss-minify-selectors": "^5.2.1", "postcss-normalize-charset": "^5.1.0", "postcss-normalize-display-values": "^5.1.0", - "postcss-normalize-positions": "^5.1.0", - "postcss-normalize-repeat-style": "^5.1.0", + "postcss-normalize-positions": "^5.1.1", + "postcss-normalize-repeat-style": "^5.1.1", "postcss-normalize-string": "^5.1.0", "postcss-normalize-timing-functions": "^5.1.0", "postcss-normalize-unicode": "^5.1.0", "postcss-normalize-url": "^5.1.0", "postcss-normalize-whitespace": "^5.1.1", - "postcss-ordered-values": "^5.1.2", + "postcss-ordered-values": "^5.1.3", "postcss-reduce-initial": "^5.1.0", "postcss-reduce-transforms": "^5.1.0", "postcss-svgo": "^5.1.0", @@ -10938,7 +10959,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -11171,7 +11192,7 @@ "version": "10.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", - "dev": true, + "devOptional": true, "engines": { "node": ">=10" } @@ -11190,7 +11211,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true + "devOptional": true }, "node_modules/ejs": { "version": "3.1.8", @@ -11208,9 +11229,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.150", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.150.tgz", - "integrity": "sha512-MP3oBer0X7ZeS9GJ0H6lmkn561UxiwOIY9TTkdxVY7lI9G6GVCKfgJaHaDcakwdKxBXA4T3ybeswH/WBIN/KTA==" + "version": "1.4.177", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.177.tgz", + "integrity": "sha512-FYPir3NSBEGexSZUEeht81oVhHfLFl6mhUKSkjHN/iB/TwEIt/WHQrqVGfTLN5gQxwJCQkIJBe05eOXjI7omgg==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -11260,7 +11281,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.8" } @@ -11296,9 +11317,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", - "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", + "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -11701,7 +11722,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true + "devOptional": true }, "node_modules/escape-string-regexp": { "version": "1.0.5", @@ -11794,7 +11815,7 @@ "node_modules/escodegen/node_modules/type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, "dependencies": { "prelude-ls": "~1.1.2" @@ -11891,6 +11912,7 @@ "version": "1.47.1", "resolved": "https://registry.npmjs.org/eslint-plugin-ngrx/-/eslint-plugin-ngrx-1.47.1.tgz", "integrity": "sha512-o2b0nGFiwHSRty0CqfxopRoEp5ZsxMUPgyEiXOHnRhWsiZMYDfksy/+ULtw3Sv71Fugora3eH5kG98IyyG3oog==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", "dev": true, "dependencies": { "@angular-devkit/schematics": "^12.2.2", @@ -12265,7 +12287,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, + "devOptional": true, "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -12341,15 +12363,15 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.6" } }, "node_modules/ethers": { - "version": "5.6.8", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.8.tgz", - "integrity": "sha512-YxIGaltAOdvBFPZwIkyHnXbW40f1r8mHUgapW6dxkO+6t7H6wY8POUn0Kbxrd/N7I4hHxyi7YCddMAH/wmho2w==", + "version": "5.6.9", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.9.tgz", + "integrity": "sha512-lMGC2zv9HC5EC+8r429WaWu3uWJUCgUCt8xxKCFqkrFuBDZXDYIdzDUECxzjf2BMF8IVBByY1EBoGSL3RTm8RA==", "funding": [ { "type": "individual", @@ -12361,7 +12383,7 @@ } ], "dependencies": { - "@ethersproject/abi": "5.6.3", + "@ethersproject/abi": "5.6.4", "@ethersproject/abstract-provider": "5.6.1", "@ethersproject/abstract-signer": "5.6.2", "@ethersproject/address": "5.6.1", @@ -12376,7 +12398,7 @@ "@ethersproject/json-wallets": "5.6.1", "@ethersproject/keccak256": "5.6.1", "@ethersproject/logger": "5.6.0", - "@ethersproject/networks": "5.6.3", + "@ethersproject/networks": "5.6.4", "@ethersproject/pbkdf2": "5.6.1", "@ethersproject/properties": "5.6.0", "@ethersproject/providers": "5.6.8", @@ -12400,9 +12422,9 @@ "dev": true }, "node_modules/eventemitter2": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.5.tgz", - "integrity": "sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw==", + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.6.tgz", + "integrity": "sha512-OHqo4wbHX5VbvlbB6o6eDwhYmiTjrpWACjF8Pmof/GTD6rdBNdZFNck3xlhqOiQFGCOoq3uzHvA0cQpFHIGVAQ==", "dev": true }, "node_modules/eventemitter3": { @@ -12637,7 +12659,7 @@ "version": "4.18.1", "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", - "dev": true, + "devOptional": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -12679,13 +12701,13 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true + "devOptional": true }, "node_modules/express/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "devOptional": true, "dependencies": { "ms": "2.0.0" } @@ -12694,7 +12716,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.8" } @@ -12703,13 +12725,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "devOptional": true }, "node_modules/express/node_modules/qs": { "version": "6.10.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "dev": true, + "devOptional": true, "dependencies": { "side-channel": "^1.0.4" }, @@ -13063,7 +13085,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, + "devOptional": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -13075,7 +13097,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, + "devOptional": true, "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -13093,7 +13115,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "devOptional": true, "dependencies": { "ms": "2.0.0" } @@ -13102,7 +13124,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "devOptional": true }, "node_modules/find-cache-dir": { "version": "3.3.1", @@ -13144,36 +13166,36 @@ } }, "node_modules/firebase": { - "version": "9.8.2", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-9.8.2.tgz", - "integrity": "sha512-cVPpiR18vsLuGWAAVkVhNO6mYsEgYBqawvMI2zxKo2FCtneyBgMwOyWKI8VyCmL5ze5p5QJTPjkoatM6rZkd0Q==", - "dependencies": { - "@firebase/analytics": "0.7.9", - "@firebase/analytics-compat": "0.1.10", - "@firebase/app": "0.7.25", - "@firebase/app-check": "0.5.8", - "@firebase/app-check-compat": "0.2.8", - "@firebase/app-compat": "0.1.26", + "version": "9.8.4", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-9.8.4.tgz", + "integrity": "sha512-fQigVEtSBprGBDLVTr485KQJ1YUWh/HeocMQvmhaUCL9dHUnW8GWfK+XkKOV2kcDB1Ur8xZPkjCxlmoTcykhgA==", + "dependencies": { + "@firebase/analytics": "0.7.11", + "@firebase/analytics-compat": "0.1.12", + "@firebase/app": "0.7.27", + "@firebase/app-check": "0.5.10", + "@firebase/app-check-compat": "0.2.10", + "@firebase/app-compat": "0.1.28", "@firebase/app-types": "0.7.0", - "@firebase/auth": "0.20.2", - "@firebase/auth-compat": "0.2.15", - "@firebase/database": "0.13.0", - "@firebase/database-compat": "0.2.0", - "@firebase/firestore": "3.4.9", - "@firebase/firestore-compat": "0.1.18", - "@firebase/functions": "0.8.1", - "@firebase/functions-compat": "0.2.1", - "@firebase/installations": "0.5.9", - "@firebase/messaging": "0.9.13", - "@firebase/messaging-compat": "0.1.13", - "@firebase/performance": "0.5.9", - "@firebase/performance-compat": "0.1.9", + "@firebase/auth": "0.20.4", + "@firebase/auth-compat": "0.2.17", + "@firebase/database": "0.13.2", + "@firebase/database-compat": "0.2.2", + "@firebase/firestore": "3.4.11", + "@firebase/firestore-compat": "0.1.20", + "@firebase/functions": "0.8.3", + "@firebase/functions-compat": "0.2.3", + "@firebase/installations": "0.5.11", + "@firebase/messaging": "0.9.15", + "@firebase/messaging-compat": "0.1.15", + "@firebase/performance": "0.5.11", + "@firebase/performance-compat": "0.1.11", "@firebase/polyfill": "0.3.36", - "@firebase/remote-config": "0.3.8", - "@firebase/remote-config-compat": "0.1.9", - "@firebase/storage": "0.9.6", - "@firebase/storage-compat": "0.1.14", - "@firebase/util": "1.6.0" + "@firebase/remote-config": "0.3.10", + "@firebase/remote-config-compat": "0.1.11", + "@firebase/storage": "0.9.8", + "@firebase/storage-compat": "0.1.16", + "@firebase/util": "1.6.2" } }, "node_modules/firebase-tools": { @@ -27361,9 +27383,9 @@ } }, "node_modules/flatted": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", "dev": true }, "node_modules/flatten": { @@ -27441,7 +27463,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -27476,7 +27498,7 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -27491,7 +27513,7 @@ "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, + "devOptional": true, "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -27505,7 +27527,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, + "devOptional": true, "dependencies": { "minipass": "^3.0.0" }, @@ -27736,7 +27758,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, + "devOptional": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -28158,7 +28180,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, + "devOptional": true, "dependencies": { "depd": "2.0.0", "inherits": "2.0.4", @@ -28174,15 +28196,15 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.8" } }, "node_modules/http-parser-js": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.6.tgz", - "integrity": "sha512-vDlkRPDJn93swjcjqMSaGSPABbIarsr1TLAui/gLDXzV5VsJNdXNzMYDyNBLQkjWQCJ1uizu8T2oDMhmGt0PRA==" + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==" }, "node_modules/http-proxy": { "version": "1.18.1", @@ -28347,7 +28369,7 @@ "node_modules/http-proxy-middleware/node_modules/to-regex-range": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", "dev": true, "dependencies": { "is-number": "^3.0.0", @@ -28837,7 +28859,7 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.10" } @@ -28899,7 +28921,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, + "devOptional": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -29059,7 +29081,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -29099,7 +29121,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, + "devOptional": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -29173,7 +29195,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.12.0" } @@ -29437,7 +29459,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "devOptional": true }, "node_modules/isobject": { "version": "3.0.1", @@ -31446,7 +31468,7 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, + "devOptional": true, "dependencies": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -31628,7 +31650,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, + "devOptional": true, "dependencies": { "universalify": "^2.0.0" }, @@ -31870,7 +31892,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, + "devOptional": true, "engines": { "node": ">=6" } @@ -32245,9 +32267,9 @@ } }, "node_modules/logform": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.4.0.tgz", - "integrity": "sha512-CPSJw4ftjf517EhXZGGvTHHkYobo7ZCc0kvwUoOYcjfR2UVrI66RHj8MCrfAdEitdmFqbu2BYdYs8FHHZSb6iw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.4.1.tgz", + "integrity": "sha512-7XB/tqc3VRbri9pRjU6E97mQ8vC27ivJ3lct4jhyT+n0JNDd4YKldFl0D75NqDp46hk8RC7Ma1Vjv/UPf67S+A==", "dependencies": { "@colors/colors": "1.5.0", "fecha": "^4.2.0", @@ -32455,7 +32477,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -32486,12 +32508,12 @@ } }, "node_modules/memfs": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.4.tgz", - "integrity": "sha512-W4gHNUE++1oSJVn8Y68jPXi+mkx3fXR5ITE/Ubz6EQ3xRpCN5k2CQ4AUR8094Z7211F876TyoBACGsIveqgiGA==", + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.7.tgz", + "integrity": "sha512-ygaiUSNalBX85388uskeCyhSAoOSgzBbtVCr9jA2RROssFL9Q19/ZXFqS+2Th2sr1ewNIWgFdLzLC3Yl1Zv+lw==", "dev": true, "dependencies": { - "fs-monkey": "1.0.3" + "fs-monkey": "^1.0.3" }, "engines": { "node": ">= 4.0.0" @@ -32587,7 +32609,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true + "devOptional": true }, "node_modules/merge-source-map": { "version": "1.1.0", @@ -32625,7 +32647,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -32659,7 +32681,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, + "devOptional": true, "bin": { "mime": "cli.js" }, @@ -32805,7 +32827,7 @@ "version": "1.2.6", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "devOptional": true }, "node_modules/minimist-options": { "version": "4.1.0", @@ -32822,10 +32844,10 @@ } }, "node_modules/minipass": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", - "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", - "dev": true, + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz", + "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==", + "devOptional": true, "dependencies": { "yallist": "^4.0.0" }, @@ -32912,7 +32934,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, + "devOptional": true, "dependencies": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -32944,7 +32966,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, + "devOptional": true, "bin": { "mkdirp": "bin/cmd.js" }, @@ -33070,7 +33092,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -33243,17 +33265,17 @@ "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "node_modules/node-fetch/node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "node_modules/node-fetch/node_modules/whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -33293,9 +33315,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.4.0.tgz", - "integrity": "sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==", + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", + "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -33356,7 +33378,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.10.0" } @@ -33516,9 +33538,9 @@ "dev": true }, "node_modules/nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.1.tgz", + "integrity": "sha512-JYOWTeFoS0Z93587vRJgASD5Ut11fYl5NyihP3KrYBvMe1FRRs6RN7m20SA/16GM4P6hTnZjT+UmDOt38UeXNg==", "dev": true }, "node_modules/nx": { @@ -33717,7 +33739,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, + "devOptional": true, "dependencies": { "ee-first": "1.1.1" }, @@ -34160,7 +34182,7 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.8" } @@ -34212,7 +34234,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -34227,7 +34249,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true + "devOptional": true }, "node_modules/path-type": { "version": "4.0.0", @@ -34285,7 +34307,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8.6" }, @@ -34414,7 +34436,7 @@ "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", - "dev": true, + "devOptional": true, "dependencies": { "async": "^2.6.2", "debug": "^3.1.1", @@ -34428,7 +34450,7 @@ "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, + "devOptional": true, "dependencies": { "lodash": "^4.17.14" } @@ -34437,7 +34459,7 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, + "devOptional": true, "dependencies": { "ms": "^2.1.1" } @@ -34446,7 +34468,7 @@ "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, + "devOptional": true, "dependencies": { "minimist": "^1.2.6" }, @@ -35651,9 +35673,9 @@ } }, "node_modules/postcss-merge-longhand": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.5.tgz", - "integrity": "sha512-NOG1grw9wIO+60arKa2YYsrbgvP6tp+jqc7+ZD5/MalIw234ooH2C6KlR6FEn4yle7GqZoBxSK1mLBE9KPur6w==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz", + "integrity": "sha512-6C/UGF/3T5OE2CEbOuX7iNO63dnvqhGZeUnKkDeifebY0XqkkvrctYSZurpNE902LDf2yKwwPFgotnfSoPhQiw==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0", @@ -35898,9 +35920,9 @@ } }, "node_modules/postcss-normalize-positions": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.0.tgz", - "integrity": "sha512-8gmItgA4H5xiUxgN/3TVvXRoJxkAWLW6f/KKhdsH03atg0cB8ilXnrB5PpSshwVu/dD2ZsRFQcR1OEmSBDAgcQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz", + "integrity": "sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -35913,9 +35935,9 @@ } }, "node_modules/postcss-normalize-repeat-style": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.0.tgz", - "integrity": "sha512-IR3uBjc+7mcWGL6CtniKNQ4Rr5fTxwkaDHwMBDGGs1x9IVRkYIT/M4NelZWkAOBdV6v3Z9S46zqaKGlyzHSchw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz", + "integrity": "sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==", "dev": true, "dependencies": { "postcss-value-parser": "^4.2.0" @@ -36005,9 +36027,9 @@ } }, "node_modules/postcss-ordered-values": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.2.tgz", - "integrity": "sha512-wr2avRbW4HS2XE2ZCqpfp4N/tDC6GZKZ+SVP8UBTOVS8QWrc4TD8MYrebJrvVVlGPKszmiSCzue43NDiVtgDmg==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz", + "integrity": "sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==", "dev": true, "dependencies": { "cssnano-utils": "^3.1.0", @@ -36583,9 +36605,9 @@ } }, "node_modules/prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -36659,7 +36681,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.4.0" } @@ -36737,15 +36759,15 @@ } }, "node_modules/protobufjs/node_modules/@types/node": { - "version": "17.0.41", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.41.tgz", - "integrity": "sha512-xA6drNNeqb5YyV5fO3OAEsnXLfO7uF0whiOfPTz5AeDo8KeZFmODKnvwPymMNO8qE/an8pVY/O50tig2SQCrGw==" + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.1.tgz", + "integrity": "sha512-CmR8+Tsy95hhwtZBKJBs0/FFq4XX7sDZHlGGf+0q+BRZfMbOTkzkj0AFAuTyXbObDIoanaBBW0+KEW+m3N16Wg==" }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, + "devOptional": true, "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -36917,7 +36939,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.6" } @@ -36926,7 +36948,7 @@ "version": "2.5.1", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dev": true, + "devOptional": true, "dependencies": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -37110,7 +37132,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, + "devOptional": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -37240,9 +37262,9 @@ } }, "node_modules/regexpu-core": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", - "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", + "integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA==", "dev": true, "dependencies": { "regenerate": "^1.4.2", @@ -37518,7 +37540,7 @@ "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 4" } @@ -37575,9 +37597,9 @@ } }, "node_modules/rollup": { - "version": "2.75.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.6.tgz", - "integrity": "sha512-OEf0TgpC9vU6WGROJIk1JA3LR5vk/yvqlzxqdrE2CzzXnqKXNzbAwlWUXis8RS3ZPe7LAq+YUxsRa0l3r27MLA==", + "version": "2.75.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.7.tgz", + "integrity": "sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -38071,7 +38093,7 @@ "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, + "devOptional": true, "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -38095,7 +38117,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "devOptional": true, "dependencies": { "ms": "2.0.0" } @@ -38104,13 +38126,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "devOptional": true }, "node_modules/send/node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.8" } @@ -38119,7 +38141,7 @@ "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "devOptional": true }, "node_modules/serialize-javascript": { "version": "6.0.0", @@ -38202,7 +38224,7 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, + "devOptional": true, "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -38264,7 +38286,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true + "devOptional": true }, "node_modules/sha.js": { "version": "2.4.11", @@ -38327,7 +38349,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, + "devOptional": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -38339,7 +38361,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, + "devOptional": true, "engines": { "node": ">=8" } @@ -38934,7 +38956,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "devOptional": true }, "node_modules/sshpk": { "version": "1.17.0", @@ -38964,7 +38986,7 @@ "node_modules/sshpk/node_modules/tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, "node_modules/ssri": { @@ -38983,6 +39005,7 @@ "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility", "dev": true }, "node_modules/stack-trace": { @@ -39114,7 +39137,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 0.8" } @@ -39674,7 +39697,7 @@ "version": "6.1.11", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "dev": true, + "devOptional": true, "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -39847,7 +39870,7 @@ "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, "node_modules/throat": { @@ -39859,13 +39882,13 @@ "node_modules/throttleit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", - "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=", + "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", "dev": true }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" }, "node_modules/through2": { "version": "4.0.2", @@ -39918,7 +39941,7 @@ "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true, "engines": { "node": ">=4" @@ -39927,7 +39950,7 @@ "node_modules/to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", "dev": true, "dependencies": { "kind-of": "^3.0.2" @@ -39967,7 +39990,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "devOptional": true, "dependencies": { "is-number": "^7.0.0" }, @@ -39979,7 +40002,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, + "devOptional": true, "engines": { "node": ">=0.6" } @@ -40207,7 +40230,7 @@ "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, "dependencies": { "safe-buffer": "^5.0.1" @@ -40257,7 +40280,7 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, + "devOptional": true, "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -40380,7 +40403,7 @@ "node_modules/uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==", "dev": true }, "node_modules/unique-filename": { @@ -40405,7 +40428,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true, + "devOptional": true, "engines": { "node": ">= 10.0.0" } @@ -40422,8 +40445,8 @@ "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true, + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "devOptional": true, "engines": { "node": ">= 0.8" } @@ -40431,7 +40454,7 @@ "node_modules/unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", "dev": true, "dependencies": { "has-value": "^0.3.1", @@ -40515,6 +40538,31 @@ "yarn": "*" } }, + "node_modules/update-browserslist-db": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", + "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "browserslist-lint": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -40526,14 +40574,14 @@ "node_modules/urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", "deprecated": "Please see https://github.com/lydell/urix#deprecated", "dev": true }, "node_modules/url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", "dev": true, "dependencies": { "punycode": "1.3.2", @@ -40591,13 +40639,13 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true, + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "devOptional": true, "engines": { "node": ">= 0.4.0" } @@ -40606,7 +40654,7 @@ "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, + "devOptional": true, "bin": { "uuid": "dist/bin/uuid" } @@ -40644,7 +40692,7 @@ "node_modules/validate-npm-package-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "integrity": "sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==", "dev": true, "dependencies": { "builtins": "^1.0.3" @@ -40653,8 +40701,8 @@ "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true, + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "devOptional": true, "engines": { "node": ">= 0.8" } @@ -40662,7 +40710,7 @@ "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "engines": [ "node >=0.6.0" @@ -40727,7 +40775,7 @@ "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "dependencies": { "defaults": "^1.0.3" } @@ -41504,7 +41552,7 @@ "node_modules/webpack-dev-server/node_modules/to-regex-range": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", "dev": true, "dependencies": { "is-number": "^3.0.0", @@ -41832,7 +41880,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, + "devOptional": true, "dependencies": { "isexe": "^2.0.0" }, @@ -41861,7 +41909,7 @@ "node_modules/which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", "dev": true }, "node_modules/which-typed-array": { @@ -41895,7 +41943,7 @@ "node_modules/wif": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", - "integrity": "sha1-CNP1IFbGZnkplyb63g1DKudLRwQ=", + "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", "dependencies": { "bs58check": "<3.0.0" } @@ -41907,9 +41955,9 @@ "dev": true }, "node_modules/winston": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.7.2.tgz", - "integrity": "sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.8.1.tgz", + "integrity": "sha512-r+6YAiCR4uI3N8eQNOg8k3P3PqwAm20cLKlzVD9E66Ch39+LZC+VH1UKf9JemQj2B3QoUHfKD7Poewn0Pr3Y1w==", "dependencies": { "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", @@ -41997,7 +42045,7 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "node_modules/write-file-atomic": { "version": "3.0.3", @@ -42121,7 +42169,7 @@ "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "dependencies": { "buffer-crc32": "~0.2.3", @@ -42162,9 +42210,9 @@ } }, "node_modules/zone.js": { - "version": "0.11.5", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.11.5.tgz", - "integrity": "sha512-D1/7VxEuQ7xk6z/kAROe4SUbd9CzxY4zOwVGnGHerd/SgLIVU5f4esDzQUsOCeArn933BZfWMKydH7l7dPEp0g==", + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.11.6.tgz", + "integrity": "sha512-umJqFtKyZlPli669gB1gOrRE9hxUUGkZr7mo878z+NEBJZZixJkKeVYfnoLa7g25SseUDc92OZrMKKHySyJrFg==", "dependencies": { "tslib": "^2.3.0" } @@ -42612,9 +42660,9 @@ } }, "@apollo/client": { - "version": "3.6.6", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.6.6.tgz", - "integrity": "sha512-AzNLN043wy0bDTTR9wzKYSu+I1IT2Ox3+vWckxgIt88Jfw5jHBvumf3lXE1JlgvbFCTiKS/Sa66AadQXWMVBRQ==", + "version": "3.6.9", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.6.9.tgz", + "integrity": "sha512-Y1yu8qa2YeaCUBVuw08x8NHenFi0sw2I3KCu7Kw9mDSu86HmmtHJkCAifKVrN2iPgDTW/BbP3EpSV8/EQCcxZA==", "requires": { "@graphql-typed-document-node/core": "^3.1.1", "@wry/context": "^0.6.0", @@ -42637,18 +42685,18 @@ "dev": true }, "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", + "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", "dev": true, "requires": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.18.6" } }, "@babel/compat-data": { - "version": "7.17.10", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.10.tgz", - "integrity": "sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.18.6.tgz", + "integrity": "sha512-tzulrgDT0QD6U7BJ4TKVk2SDDg7wlP39P9yAx1RfLy7vP/7rsDRlWVfbWxElslu56+r7QOhB2NSDsabYYruoZQ==", "dev": true }, "@babel/core": { @@ -42717,23 +42765,23 @@ } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz", - "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz", + "integrity": "sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw==", "dev": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/helper-explode-assignable-expression": "^7.18.6", + "@babel/types": "^7.18.6" } }, "@babel/helper-compilation-targets": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz", - "integrity": "sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.6.tgz", + "integrity": "sha512-vFjbfhNCzqdeAtZflUFrG5YIFqGTqsctrtkZ1D/NB0mDW9TwW3GmmUepYY4G9wCET5rY5ugz4OGTcLd614IzQg==", "dev": true, "requires": { - "@babel/compat-data": "^7.17.10", - "@babel/helper-validator-option": "^7.16.7", + "@babel/compat-data": "^7.18.6", + "@babel/helper-validator-option": "^7.18.6", "browserslist": "^4.20.2", "semver": "^6.3.0" }, @@ -42747,48 +42795,48 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz", - "integrity": "sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.6.tgz", + "integrity": "sha512-YfDzdnoxHGV8CzqHGyCbFvXg5QESPFkXlHtvdCkesLjjVMT2Adxe4FGUR5ChIb3DxSaXO12iIOCWoXdsUVwnqw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-member-expression-to-functions": "^7.17.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-member-expression-to-functions": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6" }, "dependencies": { "@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } } } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.12.tgz", - "integrity": "sha512-b2aZrV4zvutr9AIa6/gA3wsZKRwTKYoDxYiFKcESS3Ug2GTXzwBEvMuuFLhCQpEnRXs1zng4ISAXSUxxKBIcxw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz", + "integrity": "sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "regexpu-core": "^5.0.1" + "@babel/helper-annotate-as-pure": "^7.18.6", + "regexpu-core": "^5.1.0" }, "dependencies": { "@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } } } @@ -42818,263 +42866,264 @@ } }, "@babel/helper-environment-visitor": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", - "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.6.tgz", + "integrity": "sha512-8n6gSfn2baOY+qlp+VSzsosjCVGFqWKmDF0cCWOybh52Dw3SEyoWR1KrhMJASjLwIEkkAufZ0xvr+SxLHSpy2Q==", "dev": true }, "@babel/helper-explode-assignable-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz", - "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", + "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, "@babel/helper-function-name": { - "version": "7.17.9", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", - "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.18.6.tgz", + "integrity": "sha512-0mWMxV1aC97dhjCah5U5Ua7668r5ZmSC2DLfH2EZnf9c3/dHZKiFa5pRLMH5tjSl471tY6496ZWk/kjNONBxhw==", "dev": true, "requires": { - "@babel/template": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/template": "^7.18.6", + "@babel/types": "^7.18.6" }, "dependencies": { "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", + "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6" } } } }, "@babel/helper-hoist-variables": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", - "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", + "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.17.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz", - "integrity": "sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz", + "integrity": "sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng==", "dev": true, "requires": { - "@babel/types": "^7.17.0" + "@babel/types": "^7.18.6" } }, "@babel/helper-module-imports": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", - "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, "@babel/helper-module-transforms": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz", - "integrity": "sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.18.6.tgz", + "integrity": "sha512-L//phhB4al5uucwzlimruukHB3jRd5JGClwRMD/ROrVjXfLqovYnvQrK/JK36WYyVwGGO7OD3kMyVTjx+WVPhw==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.0", - "@babel/types": "^7.18.0" + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-module-imports": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" }, "dependencies": { "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", + "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6" } } } }, "@babel/helper-optimise-call-expression": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", - "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", + "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, "@babel/helper-plugin-utils": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz", - "integrity": "sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz", + "integrity": "sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg==", "dev": true }, "@babel/helper-remap-async-to-generator": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz", - "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.6.tgz", + "integrity": "sha512-z5wbmV55TveUPZlCLZvxWHtrjuJd+8inFhk7DG0WW87/oJuGDcjDiu7HIvGcpf5464L6xKCg3vNkmlVVz9hwyQ==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-wrap-function": "^7.16.8", - "@babel/types": "^7.16.8" + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-wrap-function": "^7.18.6", + "@babel/types": "^7.18.6" }, "dependencies": { "@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } } } }, "@babel/helper-replace-supers": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.2.tgz", - "integrity": "sha512-XzAIyxx+vFnrOxiQrToSUOzUOn0e1J2Li40ntddek1Y69AXUTXoDJ40/D5RdjFu7s7qHiaeoTiempZcbuVXh2Q==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz", + "integrity": "sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g==", "dev": true, "requires": { - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-member-expression-to-functions": "^7.17.7", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/traverse": "^7.18.2", - "@babel/types": "^7.18.2" + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-member-expression-to-functions": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" } }, "@babel/helper-simple-access": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.2.tgz", - "integrity": "sha512-7LIrjYzndorDY88MycupkpQLKS1AFfsVRm2k/9PtKScSy5tZq0McZTj+DiMRynboZfIqOKvo03pmhTaUgiD6fQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz", + "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==", "dev": true, "requires": { - "@babel/types": "^7.18.2" + "@babel/types": "^7.18.6" } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz", - "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.18.6.tgz", + "integrity": "sha512-4KoLhwGS9vGethZpAhYnMejWkX64wsnHPDwvOsKWU6Fg4+AlK2Jz3TyjQLMEPvz+1zemi/WBdkYxCD0bAfIkiw==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.18.6" } }, "@babel/helper-split-export-declaration": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", - "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", + "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } }, "@babel/helper-validator-identifier": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", - "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz", + "integrity": "sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", - "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", + "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", "dev": true }, "@babel/helper-wrap-function": { - "version": "7.16.8", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz", - "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.18.6.tgz", + "integrity": "sha512-I5/LZfozwMNbwr/b1vhhuYD+J/mU+gfGAj5td7l5Rv9WYmH6i3Om69WGKNmlIpsVW/mF6O5bvTKbvDQZVgjqOw==", "dev": true, "requires": { - "@babel/helper-function-name": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.16.8", - "@babel/types": "^7.16.8" + "@babel/helper-function-name": "^7.18.6", + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" }, "dependencies": { "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", + "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6" } } } }, "@babel/helpers": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.2.tgz", - "integrity": "sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.18.6.tgz", + "integrity": "sha512-vzSiiqbQOghPngUYt/zWGvK3LAsPhz55vc9XNN0xAl2gV4ieShI2OQli5duxWHD+72PZPTKAcfcZDE1Cwc5zsQ==", "dev": true, "requires": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.18.2", - "@babel/types": "^7.18.2" + "@babel/template": "^7.18.6", + "@babel/traverse": "^7.18.6", + "@babel/types": "^7.18.6" }, "dependencies": { "@babel/template": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", - "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.18.6.tgz", + "integrity": "sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6" } } } }, "@babel/highlight": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", - "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", + "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", - "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.6.tgz", + "integrity": "sha512-uQVSa9jJUe/G/304lXspfWVpKpK4euFLgGiMQFOCpM/bgcAdeoHwi/OQz23O9GK2osz26ZiXRRV9aV+Yl1O8tw==", "dev": true }, "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.17.12.tgz", - "integrity": "sha512-/vt0hpIw0x4b6BLKUkwlvEoiGZYYLNZ96CzyHYPbtG2jZGz6LBe7/V+drYrc/d+ovrF9NBi0pmtvmNb/FsWtRQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.18.6.tgz", + "integrity": "sha512-Udgu8ZRgrBrttVz6A0EVL0SJ1z+RLbIeqsu632SA1hf0awEppD6TvdznoH+orIF8wtFFAV/Enmw9Y+9oV8TQcw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", - "@babel/plugin-proposal-optional-chaining": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", + "@babel/plugin-proposal-optional-chaining": "^7.18.6" } }, "@babel/plugin-proposal-async-generator-functions": { @@ -43089,161 +43138,161 @@ } }, "@babel/plugin-proposal-class-properties": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.17.12.tgz", - "integrity": "sha512-U0mI9q8pW5Q9EaTHFPwSVusPMV/DV9Mm8p7csqROFLtIE9rBF5piLqyrBGigftALrBcsBGu4m38JneAe7ZDLXw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", + "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.17.12", - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-proposal-class-static-block": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.0.tgz", - "integrity": "sha512-t+8LsRMMDE74c6sV7KShIw13sqbqd58tlqNrsWoWBTIMw7SVQ0cZ905wLNS/FBCy/3PyooRHLFFlfrUNyyz5lA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.18.6.tgz", + "integrity": "sha512-+I3oIiNxrCpup3Gi8n5IGMwj0gOCAjcJUSQEcotNnCCPMEnixawOQ+KeJPlgfjzx+FKQ1QSyZOWe7wmoJp7vhw==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.18.0", - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-class-static-block": "^7.14.5" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz", - "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", + "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-proposal-export-namespace-from": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.17.12.tgz", - "integrity": "sha512-j7Ye5EWdwoXOpRmo5QmRyHPsDIe6+u70ZYZrd7uz+ebPYFKfRcLcNu3Ro0vOlJ5zuv8rU7xa+GttNiRzX56snQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.6.tgz", + "integrity": "sha512-zr/QcUlUo7GPo6+X1wC98NJADqmy5QTFWWhqeQWiki4XHafJtLl/YMGkmRB2szDD2IYJCCdBTd4ElwhId9T7Xw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.17.12.tgz", - "integrity": "sha512-rKJ+rKBoXwLnIn7n6o6fulViHMrOThz99ybH+hKHcOZbnN14VuMnH9fo2eHE69C8pO4uX1Q7t2HYYIDmv8VYkg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", + "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.17.12.tgz", - "integrity": "sha512-EqFo2s1Z5yy+JeJu7SFfbIUtToJTVlC61/C7WLKDntSw4Sz6JNAIfL7zQ74VvirxpjB5kz/kIx0gCcb+5OEo2Q==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.18.6.tgz", + "integrity": "sha512-zMo66azZth/0tVd7gmkxOkOjs2rpHyhpcFo565PUP37hSp6hSd9uUKIfTDFMz58BwqgQKhJ9YxtM5XddjXVn+Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.17.12.tgz", - "integrity": "sha512-ws/g3FSGVzv+VH86+QvgtuJL/kR67xaEIF2x0iPqdDfYW6ra6JF3lKVBkWynRLcNtIC1oCTfDRVxmm2mKzy+ag==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", + "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz", - "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", + "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.0.tgz", - "integrity": "sha512-nbTv371eTrFabDfHLElkn9oyf9VG+VKK6WMzhY2o4eHKaG19BToD9947zzGMO6I/Irstx9d8CwX6njPNIAR/yw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.18.6.tgz", + "integrity": "sha512-9yuM6wr4rIsKa1wlUAbZEazkCrgw2sMPEXCr4Rnwetu7cEW1NydkCWytLuYletbf8vFxdJxFhwEZqMpOx2eZyw==", "dev": true, "requires": { - "@babel/compat-data": "^7.17.10", - "@babel/helper-compilation-targets": "^7.17.10", - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/compat-data": "^7.18.6", + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.17.12" + "@babel/plugin-transform-parameters": "^7.18.6" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz", - "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", + "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.17.12.tgz", - "integrity": "sha512-7wigcOs/Z4YWlK7xxjkvaIw84vGhDv/P1dFGQap0nHkc8gFKY/r+hXc8Qzf5k1gY7CvGIcHqAnOagVKJJ1wVOQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.18.6.tgz", + "integrity": "sha512-PatI6elL5eMzoypFAiYDpYQyMtXTn+iMhuxxQt5mAXD4fEmKorpSI3PHd+i3JXBJN3xyA6MvJv7at23HffFHwA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6", "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, "@babel/plugin-proposal-private-methods": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.17.12.tgz", - "integrity": "sha512-SllXoxo19HmxhDWm3luPz+cPhtoTSKLJE9PXshsfrOzBqs60QP0r8OaJItrPhAj0d7mZMnNF0Y1UUggCDgMz1A==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", + "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.17.12", - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-proposal-private-property-in-object": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.17.12.tgz", - "integrity": "sha512-/6BtVi57CJfrtDNKfK5b66ydK2J5pXUKBKSPD2G1whamMuEnZWgoOIfO8Vf9F/DoD4izBLD/Au4NMQfruzzykg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.18.6.tgz", + "integrity": "sha512-9Rysx7FOctvT5ouj5JODjAFAkgGoudQuLPamZb0v1TGLpapdNaftzifU8NTWQm0IRjqoYypdrSmyWgkocDQ8Dw==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-create-class-features-plugin": "^7.17.12", - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-create-class-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" }, "dependencies": { "@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } } } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.17.12.tgz", - "integrity": "sha512-Wb9qLjXf3ZazqXA7IvI7ozqRIXIGPtSo+L5coFmEkhTQK18ao4UDDD0zdTGAarmbLj2urpRwrc6893cu5Bfh0A==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", + "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.17.12", - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-syntax-async-generators": { @@ -43391,21 +43440,21 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz", - "integrity": "sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.18.6.tgz", + "integrity": "sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.17.12.tgz", - "integrity": "sha512-PHln3CNi/49V+mza4xMwrg+WGYevSF1oaiXaC2EQfdp4HWlSjRsrDXWJiQBKpP7749u6vQ9mcry2uuFOv5CXvA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.18.6.tgz", + "integrity": "sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-async-to-generator": { @@ -43420,245 +43469,245 @@ } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz", - "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", + "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.4.tgz", - "integrity": "sha512-+Hq10ye+jlvLEogSOtq4mKvtk7qwcUQ1f0Mrueai866C82f844Yom2cttfJdMdqRLTxWpsbfbkIkOIfovyUQXw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.18.6.tgz", + "integrity": "sha512-pRqwb91C42vs1ahSAWJkxOxU1RHWDn16XAa6ggQ72wjLlWyYeAcLvTtE0aM8ph3KNydy9CQF2nLYcjq1WysgxQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-classes": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.4.tgz", - "integrity": "sha512-e42NSG2mlKWgxKUAD9EJJSkZxR67+wZqzNxLSpc51T8tRU5SLFHsPmgYR5yr7sdgX4u+iHA1C5VafJ6AyImV3A==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-optimise-call-expression": "^7.16.7", - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-replace-supers": "^7.18.2", - "@babel/helper-split-export-declaration": "^7.16.7", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.18.6.tgz", + "integrity": "sha512-XTg8XW/mKpzAF3actL554Jl/dOYoJtv3l8fxaEczpgz84IeeVf+T1u2CSvPHuZbt0w3JkIx4rdn/MRQI7mo0HQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-optimise-call-expression": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", "globals": "^11.1.0" }, "dependencies": { "@babel/helper-annotate-as-pure": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", - "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", + "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", "dev": true, "requires": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.18.6" } } } }, "@babel/plugin-transform-computed-properties": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.17.12.tgz", - "integrity": "sha512-a7XINeplB5cQUWMg1E/GI1tFz3LfK021IjV1rj1ypE+R7jHm+pIHmHl25VNkZxtx9uuYp7ThGk8fur1HHG7PgQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.18.6.tgz", + "integrity": "sha512-9repI4BhNrR0KenoR9vm3/cIc1tSBIo+u1WVjKCAynahj25O8zfbiE6JtAtHPGQSs4yZ+bA8mRasRP+qc+2R5A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-destructuring": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.0.tgz", - "integrity": "sha512-Mo69klS79z6KEfrLg/1WkmVnB8javh75HX4pi2btjvlIoasuxilEyjtsQW6XPrubNd7AQy0MMaNIaQE4e7+PQw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.18.6.tgz", + "integrity": "sha512-tgy3u6lRp17ilY8r1kP4i2+HDUwxlVqq3RTc943eAWSzGgpU1qhiKpqZ5CMyHReIYPHdo3Kg8v8edKtDqSVEyQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz", - "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", + "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.17.12.tgz", - "integrity": "sha512-EA5eYFUG6xeerdabina/xIoB95jJ17mAkR8ivx6ZSu9frKShBjpOGZPn511MTDTkiCO+zXnzNczvUM69YSf3Zw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.6.tgz", + "integrity": "sha512-NJU26U/208+sxYszf82nmGYqVF9QN8py2HFTblPT9hbawi8+1C5a9JubODLTGFuT0qlkqVinmkwOD13s0sZktg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz", - "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", + "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", "dev": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-for-of": { - "version": "7.18.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.1.tgz", - "integrity": "sha512-+TTB5XwvJ5hZbO8xvl2H4XaMDOAK57zF4miuC9qQJgysPNEAZZ9Z69rdF5LJkozGdZrjBIUAIyKUWRMmebI7vg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.6.tgz", + "integrity": "sha512-WAjoMf4wIiSsy88KmG7tgj2nFdEK7E46tArVtcgED7Bkj6Fg/tG5SbvNIOKxbFS2VFgNh6+iaPswBeQZm4ox8w==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-function-name": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz", - "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.6.tgz", + "integrity": "sha512-kJha/Gbs5RjzIu0CxZwf5e3aTTSlhZnHMT8zPWnJMjNpLOUgqevg+PN5oMH68nMCXnfiMo4Bhgxqj59KHTlAnA==", "dev": true, "requires": { - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-compilation-targets": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-literals": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.17.12.tgz", - "integrity": "sha512-8iRkvaTjJciWycPIZ9k9duu663FT7VrBdNqNgxnVXEFwOIp55JWcZd23VBRySYbnS3PwQ3rGiabJBBBGj5APmQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.6.tgz", + "integrity": "sha512-x3HEw0cJZVDoENXOp20HlypIHfl0zMIhMVZEBVTfmqbObIpsMxMbmU5nOEO8R7LYT+z5RORKPlTI5Hj4OsO9/Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz", - "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", + "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.0.tgz", - "integrity": "sha512-h8FjOlYmdZwl7Xm2Ug4iX2j7Qy63NANI+NQVWQzv6r25fqgg7k2dZl03p95kvqNclglHs4FZ+isv4p1uXMA+QA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.18.6.tgz", + "integrity": "sha512-Pra5aXsmTsOnjM3IajS8rTaLCy++nGM4v3YR4esk5PCsyg9z8NA5oQLwxzMUtDBd8F+UmVza3VxoAaWCbzH1rg==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.18.0", - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.2.tgz", - "integrity": "sha512-f5A865gFPAJAEE0K7F/+nm5CmAE3y8AWlMBG9unu5j9+tk50UQVK0QS8RNxSp7MJf0wh97uYyLWt3Zvu71zyOQ==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz", + "integrity": "sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.18.0", - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-simple-access": "^7.18.2", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-simple-access": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.4.tgz", - "integrity": "sha512-lH2UaQaHVOAeYrUUuZ8i38o76J/FnO8vu21OE+tD1MyP9lxdZoSfz+pDbWkq46GogUrdrMz3tiz/FYGB+bVThg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.18.6.tgz", + "integrity": "sha512-UbPYpXxLjTw6w6yXX2BYNxF3p6QY225wcTkfQCy3OMnSlS/C3xGtwUjEzGkldb/sy6PWLiCQ3NbYfjWUTI3t4g==", "dev": true, "requires": { - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-module-transforms": "^7.18.0", - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-validator-identifier": "^7.18.6", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.0.tgz", - "integrity": "sha512-d/zZ8I3BWli1tmROLxXLc9A6YXvGK8egMxHp+E/rRwMh1Kip0AP77VwZae3snEJ33iiWwvNv2+UIIhfalqhzZA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", + "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", "dev": true, "requires": { - "@babel/helper-module-transforms": "^7.18.0", - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-module-transforms": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.17.12.tgz", - "integrity": "sha512-vWoWFM5CKaTeHrdUJ/3SIOTRV+MBVGybOC9mhJkaprGNt5demMymDW24yC74avb915/mIRe3TgNb/d8idvnCRA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.18.6.tgz", + "integrity": "sha512-UmEOGF8XgaIqD74bC8g7iV3RYj8lMf0Bw7NJzvnS9qQhM4mg+1WHKotUIdjxgD2RGrgFLZZPCFPFj3P/kVDYhg==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.17.12", - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-new-target": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.17.12.tgz", - "integrity": "sha512-CaOtzk2fDYisbjAD4Sd1MTKGVIpRtx9bWLyj24Y/k6p4s4gQ3CqDGJauFJxt8M/LEx003d0i3klVqnN73qvK3w==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", + "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-object-super": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz", - "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", + "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/helper-replace-supers": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-replace-supers": "^7.18.6" } }, "@babel/plugin-transform-parameters": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.17.12.tgz", - "integrity": "sha512-6qW4rWo1cyCdq1FkYri7AHpauchbGLXpdwnYsfxFb+KtddHENfsY5JZb35xUwkK5opOLcJ3BNd2l7PhRYGlwIA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.18.6.tgz", + "integrity": "sha512-FjdqgMv37yVl/gwvzkcB+wfjRI8HQmc5EgOG9iGNvUY1ok+TjsoaMP7IqCDZBhkFcM5f3OPVMs6Dmp03C5k4/A==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-property-literals": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz", - "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", + "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-regenerator": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.0.tgz", - "integrity": "sha512-C8YdRw9uzx25HSIzwA7EM7YP0FhCe5wNvJbZzjVNHHPGVcDJ3Aie+qGYYdS1oVQgn+B3eAIJbWFLrJ4Jipv7nw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.18.6.tgz", + "integrity": "sha512-poqRI2+qiSdeldcz4wTSTXBRryoq3Gc70ye7m7UD5Ww0nE29IXqMl6r7Nd15WBgRd74vloEMlShtH6CKxVzfmQ==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-plugin-utils": "^7.18.6", "regenerator-transform": "^0.15.0" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.17.12.tgz", - "integrity": "sha512-1KYqwbJV3Co03NIi14uEHW8P50Md6KqFgt0FfpHdK6oyAHQVTosgPuPSiWud1HX0oYJ1hGRRlk0fP87jFpqXZA==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", + "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-runtime": { @@ -43684,68 +43733,68 @@ } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz", - "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", + "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-spread": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.17.12.tgz", - "integrity": "sha512-9pgmuQAtFi3lpNUstvG9nGfk9DkrdmWNp9KeKPFmuZCpEnxRzYlS8JgwPjYj+1AWDOSvoGN0H30p1cBOmT/Svg==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.18.6.tgz", + "integrity": "sha512-ayT53rT/ENF8WWexIRg9AiV9h0aIteyWn5ptfZTZQrjk/+f3WdrJGCY4c9wcgl2+MKkKPhzbYp97FTsquZpDCw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0" + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/helper-skip-transparent-expression-wrappers": "^7.18.6" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz", - "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", + "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-template-literals": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.2.tgz", - "integrity": "sha512-/cmuBVw9sZBGZVOMkpAEaVLwm4JmK2GZ1dFKOGGpMzEHWFmyZZ59lUU0PdRr8YNYeQdNzTDwuxP2X2gzydTc9g==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.6.tgz", + "integrity": "sha512-UuqlRrQmT2SWRvahW46cGSany0uTlcj8NYOS5sRGYi8FxPYPoLd5DDmMd32ZXEj2Jq+06uGVQKHxa/hJx2EzKw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.17.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.17.12.tgz", - "integrity": "sha512-Q8y+Jp7ZdtSPXCThB6zjQ74N3lj0f6TDh1Hnf5B+sYlzQ8i5Pjp8gW0My79iekSpT4WnI06blqP6DT0OmaXXmw==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.6.tgz", + "integrity": "sha512-7m71iS/QhsPk85xSjFPovHPcH3H9qeyzsujhTc+vcdnsXavoWYJ74zx0lP5RhpC5+iDnVLO+PPMHzC11qels1g==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.17.12" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz", - "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.6.tgz", + "integrity": "sha512-XNRwQUXYMP7VLuy54cr/KS/WeL3AZeORhrmeZ7iewgu+X2eBqmpaLI/hzqr9ZxCeUoq0ASK4GUzSM0BDhZkLFw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz", - "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", + "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", "dev": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" } }, "@babel/preset-env": { @@ -43860,9 +43909,9 @@ } }, "@babel/runtime-corejs3": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.3.tgz", - "integrity": "sha512-l4ddFwrc9rnR+EJsHsh+TJ4A35YqQz/UqcjtlX2ov53hlJYG5CxtQmNZxyajwDVmCxwy++rtvGU5HazCK4W41Q==", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.6.tgz", + "integrity": "sha512-cOu5wH2JFBgMjje+a+fz2JNIWU4GzYpl05oSob3UDvBEh6EuIn+TXFHMmBbhSb+k/4HMzgKCQfEEDArAWNF9Cw==", "dev": true, "requires": { "core-js-pure": "^3.20.2", @@ -43881,43 +43930,43 @@ } }, "@babel/traverse": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", - "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.18.2", - "@babel/helper-environment-visitor": "^7.18.2", - "@babel/helper-function-name": "^7.17.9", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.18.0", - "@babel/types": "^7.18.2", + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.6.tgz", + "integrity": "sha512-zS/OKyqmD7lslOtFqbscH6gMLFYOfG1YPqCKfAW5KrTeolKqvB8UelR49Fpr6y93kYkW2Ik00mT1LOGiAGvizw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.18.6", + "@babel/generator": "^7.18.6", + "@babel/helper-environment-visitor": "^7.18.6", + "@babel/helper-function-name": "^7.18.6", + "@babel/helper-hoist-variables": "^7.18.6", + "@babel/helper-split-export-declaration": "^7.18.6", + "@babel/parser": "^7.18.6", + "@babel/types": "^7.18.6", "debug": "^4.1.0", "globals": "^11.1.0" }, "dependencies": { "@babel/generator": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", - "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", + "version": "7.18.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.7.tgz", + "integrity": "sha512-shck+7VLlY72a2w9c3zYWuE1pwOKEiQHV7GTUbSnhyl5eu3i04t30tBY82ZRWrDfo3gkakCFtevExnxbkf2a3A==", "dev": true, "requires": { - "@babel/types": "^7.18.2", - "@jridgewell/gen-mapping": "^0.3.0", + "@babel/types": "^7.18.7", + "@jridgewell/gen-mapping": "^0.3.2", "jsesc": "^2.5.1" } } } }, "@babel/types": { - "version": "7.18.4", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz", - "integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==", + "version": "7.18.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.7.tgz", + "integrity": "sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-validator-identifier": "^7.18.6", "to-fast-properties": "^2.0.0" } }, @@ -44124,9 +44173,9 @@ } }, "typescript": { - "version": "4.7.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.3.tgz", - "integrity": "sha512-WOkT3XYvrpXx4vMMqlD+8R8R37fZkjyLGlxavMc4iB8lrl8L0DeTcHbYgw/v0N/z9wAFsgBhcsF0ruoySS22mA==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "dev": true } } @@ -44550,9 +44599,9 @@ } }, "@ethersproject/abi": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.6.3.tgz", - "integrity": "sha512-CxKTdoZY4zDJLWXG6HzNH6znWK0M79WzzxHegDoecE3+K32pzfHOzuXg2/oGSTecZynFgpkjYXNPOqXVJlqClw==", + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.6.4.tgz", + "integrity": "sha512-TTeZUlCeIHG6527/2goZA6gW5F8Emoc7MrZDC7hhP84aRGvW3TEdTnZR08Ls88YXM1m2SuK42Osw/jSi3uO8gg==", "requires": { "@ethersproject/address": "^5.6.1", "@ethersproject/bignumber": "^5.6.2", @@ -44739,9 +44788,9 @@ "integrity": "sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==" }, "@ethersproject/networks": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.3.tgz", - "integrity": "sha512-QZxRH7cA5Ut9TbXwZFiCyuPchdWi87ZtVNHWZd0R6YFgYtes2jQ3+bsslJ0WdyDe0i6QumqtoYqvY3rrQFRZOQ==", + "version": "5.6.4", + "resolved": "https://registry.npmjs.org/@ethersproject/networks/-/networks-5.6.4.tgz", + "integrity": "sha512-KShHeHPahHI2UlWdtDMn2lJETcbtaJge4k7XSjDR9h79QTd6yQJmv6Cp2ZA4JdqWnhszAOLSuJEd9C0PRw7hSQ==", "requires": { "@ethersproject/logger": "^5.6.0" } @@ -44934,26 +44983,26 @@ } }, "@firebase/analytics": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.7.9.tgz", - "integrity": "sha512-h/2L2q4/+mmV9EdvVC3XwFFbKSh8bvaYu4DMJIKnPAuGze6W5ALBLkK2GcVti6Kz1NTMJ3puxTRWE9XxRGZipQ==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.7.11.tgz", + "integrity": "sha512-rEGBmZdvD+biSAcMztrIftc/vS8Wgexau8Ok2aFqo3n3IkKDdBq2tdhh6tXsugBt755+q56HGQOHRWboaqG3LQ==", + "requires": { + "@firebase/component": "0.5.16", + "@firebase/installations": "0.5.11", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, "@firebase/analytics-compat": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.1.10.tgz", - "integrity": "sha512-7zfB+BBO5RbF7RSHOA4ZPyLvOEEvMOhRbfIjh5ZmizAQY2J6tZB8t+dwQ/q4hqZVGgw4ds4g0JYuRKZKYsWADg==", + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/@firebase/analytics-compat/-/analytics-compat-0.1.12.tgz", + "integrity": "sha512-mXR02p/4C9Xx07prhzr9nwocH6Xn3vpcO7DMGUMNB0qKdJADOaBow6LDlDY3u8ILhmHqNS8qPY3sKnhoTWzz8A==", "requires": { - "@firebase/analytics": "0.7.9", + "@firebase/analytics": "0.7.11", "@firebase/analytics-types": "0.7.0", - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, @@ -44963,38 +45012,38 @@ "integrity": "sha512-DNE2Waiwy5+zZnCfintkDtBfaW6MjIG883474v6Z0K1XZIvl76cLND4iv0YUb48leyF+PJK1KO2XrgHb/KpmhQ==" }, "@firebase/app": { - "version": "0.7.25", - "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.7.25.tgz", - "integrity": "sha512-OemDA3NZS1oEbAPFlWHeVI8Od26ZHAXUivUWFYIsYrw+YjS7FloltwyHB06Q8LQyPJIBPubGkEuzNTHz32EDCQ==", + "version": "0.7.27", + "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.7.27.tgz", + "integrity": "sha512-gLxy9wHymCsPAWuIWg2S/gOWoAN/Nbpto+IWSXPHzjVUtPRvmuBrr9rvh8D2V2zHxNb1WigoZVLy5acRAf2rHg==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "idb": "7.0.1", "tslib": "^2.1.0" } }, "@firebase/app-check": { - "version": "0.5.8", - "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.5.8.tgz", - "integrity": "sha512-DgrXnrJT0S5csa5CsvmWWSWqy61T3rOE2iZ/L4Q8+xZsjU2McpUj8g/lU8NDa4qc5mGRZ/Qjozqog1H3pwPgGw==", + "version": "0.5.10", + "resolved": "https://registry.npmjs.org/@firebase/app-check/-/app-check-0.5.10.tgz", + "integrity": "sha512-q/rpvhPBU7utREWTlsw+Nr9aZAHKZieF9o/6EJkymqFvWDDmvN+hycKidKWwJ2OcnUYjOr7GuvWUEAfw8X8/tQ==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, "@firebase/app-check-compat": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.2.8.tgz", - "integrity": "sha512-EAqFa0juE2xc52IGh2nv8E+avTLsZfbO7fkJnhPu07e5FU39pptcsRckTdHU7v1/DuWuigUVFcOD5iic9I8TQw==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@firebase/app-check-compat/-/app-check-compat-0.2.10.tgz", + "integrity": "sha512-NNxroiY3BVaEGkKs8W4dzv2WnJ4PbeBL7DpF1MlRHEZHa/48YPZv8xKx3QcKbH0T+31s7ponPYnRYsNY+j4CaA==", "requires": { - "@firebase/app-check": "0.5.8", + "@firebase/app-check": "0.5.10", "@firebase/app-check-types": "0.4.0", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, @@ -45009,14 +45058,14 @@ "integrity": "sha512-SsWafqMABIOu7zLgWbmwvHGOeQQVQlwm42kwwubsmfLmL4Sf5uGpBfDhQ0CAkpi7bkJ/NwNFKafNDL9prRNP0Q==" }, "@firebase/app-compat": { - "version": "0.1.26", - "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.1.26.tgz", - "integrity": "sha512-i5UTq1HZAHuhe7RNjgFSezbow4jVxc2oe3Gndsv+Hdut92f8L0AyssOtdU2iOylLlxbTijewAXXui4FAUzXubw==", + "version": "0.1.28", + "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.1.28.tgz", + "integrity": "sha512-yo1A32zMSaFv+hG9XcSkquA1GD8ph+Hx6hxOp8XQjtzkXA+TJzA0ehvDp1YCL6owBXn9RXphUC6mofPdDEFJKQ==", "requires": { - "@firebase/app": "0.7.25", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/app": "0.7.27", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, @@ -45026,27 +45075,27 @@ "integrity": "sha512-6fbHQwDv2jp/v6bXhBw2eSRbNBpxHcd1NBF864UksSMVIqIyri9qpJB1Mn6sGZE+bnDsSQBC5j2TbMxYsJQkQg==" }, "@firebase/auth": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.20.2.tgz", - "integrity": "sha512-anv2dhHXnlHSuXDuXIoCm/w/JJ+SiQ1TAKgNVYlhfq+yvx9Op8CxfTqcfBwfbIZ1gizw4PNLuk82m8KelsKl6Q==", + "version": "0.20.4", + "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-0.20.4.tgz", + "integrity": "sha512-pWIrPB635QpPPbr7GFt2JMvSu/+Mgz/wLnMMrX3hHaPl4UlRLKdycohPSIZF+EGgc7PLx6p9fJvcw1fGEFZNXQ==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "node-fetch": "2.6.7", "selenium-webdriver": "4.1.2", "tslib": "^2.1.0" } }, "@firebase/auth-compat": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.2.15.tgz", - "integrity": "sha512-Kl8pujKWVBJ+76h4tRsS5xI9Dvk8MVSP6eN82rnEgmCxiUsnVj5Adb/WzvS3p4/l++4mRSAEnlIVxZ2Pyaeirg==", + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.2.17.tgz", + "integrity": "sha512-GlEnDjziTEbFKqdILugBis9ZaQx57Y7bz5Uk41c793BusGXOgcZdrqjjM3DpNKPWBvi58rNbP0FdcAZA7DsWTw==", "requires": { - "@firebase/auth": "0.20.2", + "@firebase/auth": "0.20.4", "@firebase/auth-types": "0.11.0", - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/util": "1.6.2", "node-fetch": "2.6.7", "selenium-webdriver": "4.1.2", "tslib": "^2.1.0" @@ -45065,58 +45114,58 @@ "requires": {} }, "@firebase/component": { - "version": "0.5.14", - "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.5.14.tgz", - "integrity": "sha512-ct2p1MTMV5P/nGIlkC3XjAVwHwjsIZaeo8JVyDAkJCNTROu5mYX3FBK16hjIUIIVJDpgnnzFh9nP74gciL4WrA==", + "version": "0.5.16", + "resolved": "https://registry.npmjs.org/@firebase/component/-/component-0.5.16.tgz", + "integrity": "sha512-/pkl77mN9PT7dTSzNu1CrvIvd+z1CdePnEl+VITaeSBs9Ko7ZVvSIlzQLbSwqksXX3bAHpxej0Mg6mVKQiRVSw==", "requires": { - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, "@firebase/database": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.13.0.tgz", - "integrity": "sha512-lskyf5+FDnytrPJt3MLjkTDxYxutKtaYL7j/Z/De2DSVZJSR+weE/D/r47iK/+tyzMaew2v3joSgZOHvVlWshw==", + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@firebase/database/-/database-0.13.2.tgz", + "integrity": "sha512-wKkBD4rq6PPv9gl1hNJNpl0R0bwJmXCJfDuvotjXmTcU7kV0AIaJ45GVhULkbSCApAAFC6QUJ91oasDUO1ZVxw==", "requires": { "@firebase/auth-interop-types": "0.1.6", - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "faye-websocket": "0.11.4", "tslib": "^2.1.0" } }, "@firebase/database-compat": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.2.0.tgz", - "integrity": "sha512-t2HVI1RrMz8cbmhyo2LQGSInhRN9DZTDKXm55iFQgSihcnCbfoMAFyRv/FFa1Y+iERgcDI8LaOMS/LTjpYVz4g==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/database": "0.13.0", - "@firebase/database-types": "0.9.8", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@firebase/database-compat/-/database-compat-0.2.2.tgz", + "integrity": "sha512-3wLHJ54WHMhrveCywCMbkspshFezN07PLOIsmqELM1+pmrg3bwMj9u/o3Equ0DwmESMnchp5sMxgzdBUOextJg==", + "requires": { + "@firebase/component": "0.5.16", + "@firebase/database": "0.13.2", + "@firebase/database-types": "0.9.10", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, "@firebase/database-types": { - "version": "0.9.8", - "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.9.8.tgz", - "integrity": "sha512-bI7bwF5xc0nPi6Oa3JVt6JJdfhVAnEpCwgfTNILR4lYDPtxdxlRXhZzQ5lfqlCj7PR+drKh9RvMu6C24N1q04w==", + "version": "0.9.10", + "resolved": "https://registry.npmjs.org/@firebase/database-types/-/database-types-0.9.10.tgz", + "integrity": "sha512-2ji6nXRRsY+7hgU6zRhUtK0RmSjVWM71taI7Flgaw+BnopCo/lDF5HSwxp8z7LtiHlvQqeRA3Ozqx5VhlAbiKg==", "requires": { "@firebase/app-types": "0.7.0", - "@firebase/util": "1.6.0" + "@firebase/util": "1.6.2" } }, "@firebase/firestore": { - "version": "3.4.9", - "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.4.9.tgz", - "integrity": "sha512-EiSG/uYDyUmrrHlwrsP9WqWI8ChD0hUW/+0MS3NDh8Cfo1Dfb/sM3YWKzgnIZ3wKTxn/nbe9oidHZp5cqI9G+w==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", - "@firebase/webchannel-wrapper": "0.6.1", + "version": "3.4.11", + "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-3.4.11.tgz", + "integrity": "sha512-ZobzP2fQNiqT9Fh5x/8CmQVsWr3JJaM4l0xGHyaPc7vneRRC0Y0KcuKg3z3jBUXItXvlsIj7mGM4FucrxwhPzQ==", + "requires": { + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", + "@firebase/webchannel-wrapper": "0.6.2", "@grpc/grpc-js": "^1.3.2", "@grpc/proto-loader": "^0.6.0", "node-fetch": "2.6.7", @@ -45124,14 +45173,14 @@ } }, "@firebase/firestore-compat": { - "version": "0.1.18", - "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.1.18.tgz", - "integrity": "sha512-D6VXudL/B2jlZ6MGpsDPHHm/DSpfKuUOnEb5wwH89Sw0nW5snSMNG8QfYTQYKUxrX35ma+nWUnaa18LlVTUMXQ==", + "version": "0.1.20", + "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.1.20.tgz", + "integrity": "sha512-0+WAh+pjCi0t/DK5cefECiwQGiZbrAU2UenZ61Uly1w7L5ob932Qc61OQKk+Y2VD+IQ7YPcBpUM7X6JOSbgJ6g==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/firestore": "3.4.9", + "@firebase/component": "0.5.16", + "@firebase/firestore": "3.4.11", "@firebase/firestore-types": "2.5.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, @@ -45142,28 +45191,28 @@ "requires": {} }, "@firebase/functions": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.8.1.tgz", - "integrity": "sha512-UF5187TPn1Q1sFmAUU1oZdKub1t0Z6MAjcskGS6CV4OwAkILZQ9v38LIbo3wnA62R5hr3IFpdEJxKkqHojMwSg==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.8.3.tgz", + "integrity": "sha512-0mc59I97S61fvDiVhqj/k5GwSDM/mSWe+xgyxT1UWD3vocvZ5JOx0bhPwbpa7lStI6DWCiWhZrEQlp16Y7i1yg==", "requires": { "@firebase/app-check-interop-types": "0.1.0", "@firebase/auth-interop-types": "0.1.6", - "@firebase/component": "0.5.14", + "@firebase/component": "0.5.16", "@firebase/messaging-interop-types": "0.1.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "node-fetch": "2.6.7", "tslib": "^2.1.0" } }, "@firebase/functions-compat": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.2.1.tgz", - "integrity": "sha512-1epI+TGb3CxpQrnoSJnKMUqBLn9b6KA1Rro6ISmZIEkaDEi8p8q3UI917XP+OewiPG71xvpySiEIIxWyktcl+A==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.2.3.tgz", + "integrity": "sha512-we6a5a6HcCwLMXzITNWfvBxxIlCqcXCeUsomEb0Gyf1/ecVod8L3dcsWNTZB87OYjTSpVS+Jn+H+NpjOMvrlmA==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/functions": "0.8.1", + "@firebase/component": "0.5.16", + "@firebase/functions": "0.8.3", "@firebase/functions-types": "0.5.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, @@ -45173,45 +45222,45 @@ "integrity": "sha512-qza0M5EwX+Ocrl1cYI14zoipUX4gI/Shwqv0C1nB864INAD42Dgv4v94BCyxGHBg2kzlWy8PNafdP7zPO8aJQA==" }, "@firebase/installations": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.5.9.tgz", - "integrity": "sha512-0XvF9ig8Zj7MWP4Aq5/Wcyjq9f/cDtD6DKFJhp3BT1AjmACdmq7WD72xok8UBhkOiqymIiGd5eQf7rX225D2Sw==", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/@firebase/installations/-/installations-0.5.11.tgz", + "integrity": "sha512-54pTWQXYHBNlwUwtHDitr/N4dFOBi/LYoBlpbyIrjlqdkXSk0WOVDMV15cMdfCyCZQgJVMW78c52ZrDZxwW05g==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/util": "1.6.2", "idb": "7.0.1", "tslib": "^2.1.0" } }, "@firebase/logger": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.3.2.tgz", - "integrity": "sha512-lzLrcJp9QBWpo40OcOM9B8QEtBw2Fk1zOZQdvv+rWS6gKmhQBCEMc4SMABQfWdjsylBcDfniD1Q+fUX1dcBTXA==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@firebase/logger/-/logger-0.3.3.tgz", + "integrity": "sha512-POTJl07jOKTOevLXrTvJD/VZ0M6PnJXflbAh5J9VGkmtXPXNG6MdZ9fmRgqYhXKTaDId6AQenQ262uwgpdtO0Q==", "requires": { "tslib": "^2.1.0" } }, "@firebase/messaging": { - "version": "0.9.13", - "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.9.13.tgz", - "integrity": "sha512-wR/SGYGG/bmz1gRqm6/eGI6zRg/X3qNP0BCk0Oa6xVDKK04UCE9zNRgQYgCSKNP+zuLfDhpHbXvvXQp9/vBYVA==", + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.9.15.tgz", + "integrity": "sha512-UEMbjj3UdsHipdljrFMNyasYLPzEOLXRfaZdpV7StHuqa5r3M9jKRM16tcszNMWXVNuiXT4k0VPXXGZPtiYQDQ==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", + "@firebase/component": "0.5.16", + "@firebase/installations": "0.5.11", "@firebase/messaging-interop-types": "0.1.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "idb": "7.0.1", "tslib": "^2.1.0" } }, "@firebase/messaging-compat": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.1.13.tgz", - "integrity": "sha512-kGuzjpl+pcTRmEgGDjyOKQnxxQgC7wIJIIHhLMIpfxHHL5+ysN1Tjq0Ztr1t/gcdHKErtnD/n9To5eoGZHqpzA==", + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.1.15.tgz", + "integrity": "sha512-f9xbp/V4onNgg7tTC9rY/9gb5F3S+1m1YMU39GHATXcoO4qVCN429VFbVSWQ9RI7f85HddPsULWX7Moq+MwzNw==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/messaging": "0.9.13", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/messaging": "0.9.15", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, @@ -45221,27 +45270,27 @@ "integrity": "sha512-DbvUl/rXAZpQeKBnwz0NYY5OCqr2nFA0Bj28Fmr3NXGqR4PAkfTOHuQlVtLO1Nudo3q0HxAYLa68ZDAcuv2uKQ==" }, "@firebase/performance": { - "version": "0.5.9", - "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.5.9.tgz", - "integrity": "sha512-cA1pea1hkIZt0FG0a42tjKQNBhdY7q4apqHML92vBCS9QOOR0SHBui44IGQJRfRBGiVICHW03Q+ikSZv08g+jw==", - "requires": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.5.11.tgz", + "integrity": "sha512-neHlHi1bs0LkNCZgzSWBm+YBqkaKFkxj+JtD4E4EQTENdHsAAAL4JnSKPOP1c+4CQqDnRbYW9QMXPcDlL21pow==", + "requires": { + "@firebase/component": "0.5.16", + "@firebase/installations": "0.5.11", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, "@firebase/performance-compat": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.1.9.tgz", - "integrity": "sha512-EBX4u/uK76ikJSyoWZ2cEMj63G01w1DA68KDpSypSMhKPJE2eiCtWABRTSXhcaisq/FDwZzl4XhNjDyfzArwhA==", + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@firebase/performance-compat/-/performance-compat-0.1.11.tgz", + "integrity": "sha512-M1paA6KG4j5OGvgpvg25Y6x5/lUIpSJVL6fyq4af3YjFcLoSijqiBq/KTiFEt3vLJWiOmK2p9Apu3MHiffBi0A==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/performance": "0.5.9", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/performance": "0.5.11", "@firebase/performance-types": "0.1.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, @@ -45268,27 +45317,27 @@ } }, "@firebase/remote-config": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.3.8.tgz", - "integrity": "sha512-z5HYrjrgzkR25nlvQqiPowDGatlEJirA5sN1B6rOy+KYMLsb6IXLVOdKjj/Tg/uHAErwd0DblGxwBUZKTCuo1g==", + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@firebase/remote-config/-/remote-config-0.3.10.tgz", + "integrity": "sha512-n55NDxX9kt6QoDH0z3Ryjbjx/S6xNobfjK/hdMN/3fNZh0WSuAZKMWUiw/59cnbZkFxQBncOGDN5Cc/bdp3bdg==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/installations": "0.5.9", - "@firebase/logger": "0.3.2", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/installations": "0.5.11", + "@firebase/logger": "0.3.3", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, "@firebase/remote-config-compat": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.1.9.tgz", - "integrity": "sha512-ud4yINy8cegE82KoBDXS4fOp6qwy0+7zl0k587kMXHSWHbWVRZ/uKMQGJQc7kG0EQp0tZhM20CxVwtcCGsABBA==", + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@firebase/remote-config-compat/-/remote-config-compat-0.1.11.tgz", + "integrity": "sha512-75mjt2M+MXa/j2J9wuRVrUFDekFoKkK5/ogBPxckvjzSXGDDwbGmrrb0MwG6BdUSxSUaHrAeUYhEQ2vwNfa1Gw==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/logger": "0.3.2", - "@firebase/remote-config": "0.3.8", + "@firebase/component": "0.5.16", + "@firebase/logger": "0.3.3", + "@firebase/remote-config": "0.3.10", "@firebase/remote-config-types": "0.2.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, @@ -45298,25 +45347,25 @@ "integrity": "sha512-hqK5sCPeZvcHQ1D6VjJZdW6EexLTXNMJfPdTwbD8NrXUw6UjWC4KWhLK/TSlL0QPsQtcKRkaaoP+9QCgKfMFPw==" }, "@firebase/storage": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.9.6.tgz", - "integrity": "sha512-q8/s3qFbFl+AlKbyEtGA7FRVhcMu3NKPqHueBTn5XSI0B3bfxptBcDJMb9txs69ppve6P3jrK1//TEWpjTGJUg==", + "version": "0.9.8", + "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.9.8.tgz", + "integrity": "sha512-tfRDVjDjTDIBHm7CTFcboZ7UC+GUKkBIhmoHt2tTVyZfEDKtE4ZPnHy7i6RSeY624wM+/IGWn5o+1CCf3uEEGQ==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/util": "1.6.0", + "@firebase/component": "0.5.16", + "@firebase/util": "1.6.2", "node-fetch": "2.6.7", "tslib": "^2.1.0" } }, "@firebase/storage-compat": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.1.14.tgz", - "integrity": "sha512-/Fey1n+ryIeAEyd/qXPXh32ReFZUhzE5W0z/+LDA+3yyMGw/a6wCzQqe7wBiGiCRhjd+5XiV++jkCXTflun3Dg==", + "version": "0.1.16", + "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.1.16.tgz", + "integrity": "sha512-YSK0QHPCyyALBiJHvtlejrmtrQKst7aJiHyEm1VkcyLdm5RMcZ6JkdObOeACxa9/qwATYQLNlwy/C+//RuzyrA==", "requires": { - "@firebase/component": "0.5.14", - "@firebase/storage": "0.9.6", + "@firebase/component": "0.5.16", + "@firebase/storage": "0.9.8", "@firebase/storage-types": "0.6.0", - "@firebase/util": "1.6.0", + "@firebase/util": "1.6.2", "tslib": "^2.1.0" } }, @@ -45327,17 +45376,17 @@ "requires": {} }, "@firebase/util": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.6.0.tgz", - "integrity": "sha512-6+hhqb4Zzjoo12xofTDHPkgW3FnN4ydBsjd5X2KuQI268DR3W3Ld64W/gkKPZrKRgUxeNeb+pykfP3qRe7q+vA==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@firebase/util/-/util-1.6.2.tgz", + "integrity": "sha512-VYDqEf/+mS7n0nPj6qJDJYFtKIEfOaTtQeNDsd3x+xp8HWvrbygWOexzeGicLP1dvEzrKr3eQGcJmmmYN3TIsA==", "requires": { "tslib": "^2.1.0" } }, "@firebase/webchannel-wrapper": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.6.1.tgz", - "integrity": "sha512-9FqhNjKQWpQ3fGnSOCovHOm+yhhiorKEqYLAfd525jWavunDJcx8rOW6i6ozAh+FbwcYMkL7b+3j4UR/30MpoQ==" + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.6.2.tgz", + "integrity": "sha512-zThUKcqIU6utWzM93uEvhlh8qj8A5LMPFJPvk/ODb+8GSSif19xM2Lw1M2ijyBy8+6skSkQBbavPzOU5Oh/8tQ==" }, "@graphql-typed-document-node/core": { "version": "3.1.1", @@ -45985,12 +46034,12 @@ } }, "@jridgewell/gen-mapping": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", - "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", + "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.0", + "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.9" } @@ -46002,21 +46051,21 @@ "dev": true }, "@jridgewell/set-array": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", - "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", "dev": true }, "@jridgewell/sourcemap-codec": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", - "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "version": "1.4.14", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", - "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "version": "0.3.14", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz", + "integrity": "sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ==", "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", @@ -46024,9 +46073,9 @@ }, "dependencies": { "@jridgewell/resolve-uri": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", - "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.8.tgz", + "integrity": "sha512-YK5G9LaddzGbcucK4c8h5tWFmMPBvRZ/uyWmN1/SbBdIvqGUdWGkJ5BAaccgs6XbzVLsqbPJrBSFwKv3kT9i7w==", "dev": true } } @@ -46045,9 +46094,9 @@ } }, "@keplr-wallet/types": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.10.5.tgz", - "integrity": "sha512-CY1F+Rsfe2fs5uPioC1o80lKxQWsYHIwoILLptdebr2Sg1DjSuWVLHWScsB8EbBGm0LQQ9nQ+3LHklbsTNo2bw==", + "version": "0.10.9", + "resolved": "https://registry.npmjs.org/@keplr-wallet/types/-/types-0.10.9.tgz", + "integrity": "sha512-wp55NYX7joHfHV4huyVyvR2fOUcyTvJgbVsPz73+5ONPYk2WnhfdjCo2OxtuX4+B0Nu53vNgYSD6kn1nl4V3wg==", "dev": true, "requires": { "@cosmjs/launchpad": "^0.24.0-alpha.25", @@ -46205,21 +46254,21 @@ } }, "@nrwl/cli": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-14.2.2.tgz", - "integrity": "sha512-LnIgs2kkCoVe4x2mDBhdMfD7yD1d0TteJKY6MO7V0NaMjUMiJHpFz2xGQQkre/UpcRHDCHd7xwYEN4J8auNfKQ==", + "version": "14.4.0", + "resolved": "https://registry.npmjs.org/@nrwl/cli/-/cli-14.4.0.tgz", + "integrity": "sha512-Hmn+Yj7VTmaztOgTCe0kYtZkBsp6NGPfvbm27FTgcda5TsxCkrCLah6btuS7hcX+h4Ss308z9hFMfNk2EvVWXA==", "dev": true, "requires": { - "nx": "14.2.2" + "nx": "14.4.0" }, "dependencies": { "@nrwl/tao": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-14.2.2.tgz", - "integrity": "sha512-FSqgsWEBJEVa70+crT20OqgI15XJjiy1x3fADx9hYFMQz/NYwQuFlmZG8xiZcRnEy2bOE6pdb5s6ThokjdE5XQ==", + "version": "14.4.0", + "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-14.4.0.tgz", + "integrity": "sha512-8PFM72SMWyhIPPeGpIJzzST/yfMAsf0zRKNfB90ra7FlHXXXzDZmpJvV8JpnCtSBGjT8OrcpZ8siD4JXov4ueA==", "dev": true, "requires": { - "nx": "14.2.2" + "nx": "14.4.0" } }, "ansi-styles": { @@ -46231,6 +46280,12 @@ "color-convert": "^2.0.1" } }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -46289,6 +46344,15 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, "minimatch": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", @@ -46299,13 +46363,13 @@ } }, "nx": { - "version": "14.2.2", - "resolved": "https://registry.npmjs.org/nx/-/nx-14.2.2.tgz", - "integrity": "sha512-7QXNhcC8FqoLuq7yCEXS6rrfWX/KgFZk+Q++Fg4MBXXnIJ3xR6Fd3Db5R2jSFodio++hzA92ZWe2R/TAftageg==", + "version": "14.4.0", + "resolved": "https://registry.npmjs.org/nx/-/nx-14.4.0.tgz", + "integrity": "sha512-YemgZ3NHmO5Ik0lruoSCoT5ORaUrcI7gpqtmI1SL8hSPJs4kg2hYevoIb6sE0CTsxuqDHFnRR8qhdPLcSgHGxQ==", "dev": true, "requires": { - "@nrwl/cli": "14.2.2", - "@nrwl/tao": "14.2.2", + "@nrwl/cli": "14.4.0", + "@nrwl/tao": "14.4.0", "@parcel/watcher": "2.0.4", "chalk": "4.1.0", "chokidar": "^3.5.1", @@ -46320,6 +46384,7 @@ "fs-extra": "^10.1.0", "glob": "7.1.4", "ignore": "^5.0.4", + "js-yaml": "4.1.0", "jsonc-parser": "3.0.0", "minimatch": "3.0.5", "npm-run-path": "^4.0.1", @@ -46683,9 +46748,9 @@ } }, "@testing-library/dom": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.13.0.tgz", - "integrity": "sha512-9VHgfIatKNXQNaZTtLnalIy0jNZzY35a4S3oi08YAt9Hv1VsfZ/DfA45lM8D/UhtHBGJ4/lGwp0PZkVndRkoOQ==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.14.0.tgz", + "integrity": "sha512-m8FOdUo77iMTwVRCyzWcqxlEIk+GnopbrRI15a0EaLbpZSCinIVI4kSQzWhkShK83GogvEFJSsHF3Ws0z1vrqA==", "dev": true, "requires": { "@babel/code-frame": "^7.10.4", @@ -46923,18 +46988,18 @@ } }, "@types/eslint": { - "version": "8.4.3", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.3.tgz", - "integrity": "sha512-YP1S7YJRMPs+7KZKDb9G63n8YejIwW9BALq7a5j2+H4yl6iOv9CB29edho+cuFRrvmJbbaH2yiVChKLJVysDGw==", + "version": "8.4.5", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.5.tgz", + "integrity": "sha512-dhsC09y1gpJWnK+Ff4SGvCuSnk9DaU0BJZSzOwa6GVSg65XtTugLBITDAAzRU5duGBoXBHpdR/9jHGxJjNflJQ==", "requires": { "@types/estree": "*", "@types/json-schema": "*" } }, "@types/eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", + "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", "requires": { "@types/eslint": "*", "@types/estree": "*" @@ -47413,7 +47478,7 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, + "devOptional": true, "requires": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -47568,7 +47633,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, + "devOptional": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -47614,7 +47679,7 @@ "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, + "devOptional": true, "requires": { "sprintf-js": "~1.0.2" } @@ -48099,7 +48164,7 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true } } @@ -48134,7 +48199,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true + "devOptional": true }, "bindings": { "version": "1.5.0", @@ -48214,7 +48279,7 @@ "version": "1.20.0", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz", "integrity": "sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg==", - "dev": true, + "devOptional": true, "requires": { "bytes": "3.1.2", "content-type": "~1.0.4", @@ -48234,7 +48299,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "devOptional": true, "requires": { "ms": "2.0.0" } @@ -48243,19 +48308,19 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true + "devOptional": true }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "devOptional": true }, "qs": { "version": "6.10.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "dev": true, + "devOptional": true, "requires": { "side-channel": "^1.0.4" } @@ -48295,7 +48360,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, + "devOptional": true, "requires": { "fill-range": "^7.0.1" } @@ -48385,15 +48450,14 @@ } }, "browserslist": { - "version": "4.20.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.4.tgz", - "integrity": "sha512-ok1d+1WpnU24XYN7oC3QWgTyMhY/avPJ/r9T00xxvUOIparA/gc+UPUMaod3i+G6s+nI2nUb9xZ5k794uIwShw==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.1.tgz", + "integrity": "sha512-Nq8MFCSrnJXSc88yliwlzQe3qNe3VntIjhsArW9IJOEPSHNx23FalwApUVbzAWABLhYJJ7y8AynWI/XM8OdfjQ==", "requires": { - "caniuse-lite": "^1.0.30001349", - "electron-to-chromium": "^1.4.147", - "escalade": "^3.1.1", + "caniuse-lite": "^1.0.30001359", + "electron-to-chromium": "^1.4.172", "node-releases": "^2.0.5", - "picocolors": "^1.0.0" + "update-browserslist-db": "^1.0.4" } }, "bs-logger": { @@ -48484,7 +48548,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "dev": true + "devOptional": true }, "bytesish": { "version": "0.4.4", @@ -48591,9 +48655,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001352", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001352.tgz", - "integrity": "sha512-GUgH8w6YergqPQDGWhJGt8GDRnY0L/iJVQcU3eJ46GYf52R8tk0Wxp0PymuFVZboJYXGiCqwozAYZNRjVj6IcA==" + "version": "1.0.30001363", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001363.tgz", + "integrity": "sha512-HpQhpzTGGPVMnCjIomjt+jvyUu8vNFo3TaDiZ/RcoTrlOq/5+tC8zHdsbgFB6MxmaY+jCpsH09aD80Bb4Ow3Sg==" }, "canonical-path": { "version": "1.0.0", @@ -48645,7 +48709,7 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, + "devOptional": true, "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -48661,7 +48725,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "dev": true + "devOptional": true }, "chrome-trace-event": { "version": "1.0.3", @@ -48669,9 +48733,9 @@ "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" }, "ci-info": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.1.tgz", - "integrity": "sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz", + "integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==", "dev": true }, "cipher-base": { @@ -48930,9 +48994,9 @@ "dev": true }, "colorette": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.17.tgz", - "integrity": "sha512-hJo+3Bkn0NCHybn9Tu35fIeoOKGOk5OCC32y4Hz2It+qlCO2Q3DeQ1hRn/tDDMQKRYUEzqsl7jbF6dYKjlE60g==", + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", + "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, "colorspace": { @@ -48968,7 +49032,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==", - "dev": true + "devOptional": true }, "common-tags": { "version": "1.8.2", @@ -49072,7 +49136,7 @@ "version": "0.5.4", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, + "devOptional": true, "requires": { "safe-buffer": "5.2.1" } @@ -49081,7 +49145,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "dev": true + "devOptional": true }, "conventional-changelog-angular": { "version": "5.0.13", @@ -49139,13 +49203,13 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true + "devOptional": true }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true + "devOptional": true }, "copy-anything": { "version": "2.0.6", @@ -49231,12 +49295,12 @@ "dev": true }, "core-js-compat": { - "version": "3.22.8", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.22.8.tgz", - "integrity": "sha512-pQnwg4xtuvc2Bs/5zYQPaEYYSuTxsF7LBWF0SvnVhthZo/Qe+rJpcEekrdNK5DWwDJ0gv0oI9NNX5Mppdy0ctg==", + "version": "3.23.3", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.3.tgz", + "integrity": "sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw==", "dev": true, "requires": { - "browserslist": "^4.20.3", + "browserslist": "^4.21.0", "semver": "7.0.0" }, "dependencies": { @@ -49249,9 +49313,9 @@ } }, "core-js-pure": { - "version": "3.22.8", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.22.8.tgz", - "integrity": "sha512-bOxbZIy9S5n4OVH63XaLVXZ49QKicjowDx/UELyJ68vxfCRpYsbyh/WNZNfEfAk+ekA8vSjt+gCDpvh672bc3w==", + "version": "3.23.3", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.23.3.tgz", + "integrity": "sha512-XpoouuqIj4P+GWtdyV8ZO3/u4KftkeDVMfvp+308eGMhCrA3lVDSmAxO0c6GGOcmgVlaKDrgWVMo49h2ab/TDA==", "dev": true }, "core-util-is": { @@ -49387,7 +49451,7 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, + "devOptional": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -49491,9 +49555,9 @@ "dev": true }, "css-declaration-sorter": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.2.2.tgz", - "integrity": "sha512-Ufadglr88ZLsrvS11gjeu/40Lw74D9Am/Jpr3LlYm5Q4ZP5KdlUhG+6u2EjyXeZcxmZ2h1ebCKngDjolpeLHpg==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.0.tgz", + "integrity": "sha512-OGT677UGHJTAVMRhPO+HJ4oKln3wkBTwtDFH0ojbqm+MJm6xuDMHp2nkhh/ThaBqq20IbraBQSWKfSLNHQO9Og==", "dev": true, "requires": {} }, @@ -49721,23 +49785,23 @@ "dev": true }, "cssnano": { - "version": "5.1.11", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.11.tgz", - "integrity": "sha512-2nx+O6LvewPo5EBtYrKc8762mMkZRk9cMGIOP4UlkmxHm7ObxH+zvsJJ+qLwPkUc4/yumL/qJkavYi9NlodWIQ==", + "version": "5.1.12", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.12.tgz", + "integrity": "sha512-TgvArbEZu0lk/dvg2ja+B7kYoD7BBCmn3+k58xD0qjrGHsFzXY/wKTo9M5egcUCabPol05e/PVoIu79s2JN4WQ==", "dev": true, "requires": { - "cssnano-preset-default": "^5.2.11", + "cssnano-preset-default": "^5.2.12", "lilconfig": "^2.0.3", "yaml": "^1.10.2" } }, "cssnano-preset-default": { - "version": "5.2.11", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.11.tgz", - "integrity": "sha512-4PadR1NtuaIK8MvLNuY7MznK4WJteldGlzCiMaaTiOUP+apeiIvUDIXykzUOoqgOOUAHrU64ncdD90NfZR3LSQ==", + "version": "5.2.12", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.12.tgz", + "integrity": "sha512-OyCBTZi+PXgylz9HAA5kHyoYhfGcYdwFmyaJzWnzxuGRtnMw/kR6ilW9XzlzlRAtB6PLT/r+prYgkef7hngFew==", "dev": true, "requires": { - "css-declaration-sorter": "^6.2.2", + "css-declaration-sorter": "^6.3.0", "cssnano-utils": "^3.1.0", "postcss-calc": "^8.2.3", "postcss-colormin": "^5.3.0", @@ -49746,7 +49810,7 @@ "postcss-discard-duplicates": "^5.1.0", "postcss-discard-empty": "^5.1.1", "postcss-discard-overridden": "^5.1.0", - "postcss-merge-longhand": "^5.1.5", + "postcss-merge-longhand": "^5.1.6", "postcss-merge-rules": "^5.1.2", "postcss-minify-font-values": "^5.1.0", "postcss-minify-gradients": "^5.1.1", @@ -49754,14 +49818,14 @@ "postcss-minify-selectors": "^5.2.1", "postcss-normalize-charset": "^5.1.0", "postcss-normalize-display-values": "^5.1.0", - "postcss-normalize-positions": "^5.1.0", - "postcss-normalize-repeat-style": "^5.1.0", + "postcss-normalize-positions": "^5.1.1", + "postcss-normalize-repeat-style": "^5.1.1", "postcss-normalize-string": "^5.1.0", "postcss-normalize-timing-functions": "^5.1.0", "postcss-normalize-unicode": "^5.1.0", "postcss-normalize-url": "^5.1.0", "postcss-normalize-whitespace": "^5.1.1", - "postcss-ordered-values": "^5.1.2", + "postcss-ordered-values": "^5.1.3", "postcss-reduce-initial": "^5.1.0", "postcss-reduce-transforms": "^5.1.0", "postcss-svgo": "^5.1.0", @@ -50339,7 +50403,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true + "devOptional": true }, "detect-newline": { "version": "3.1.0", @@ -50519,7 +50583,7 @@ "version": "10.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz", "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==", - "dev": true + "devOptional": true }, "ecc-jsbn": { "version": "0.1.2", @@ -50535,7 +50599,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true + "devOptional": true }, "ejs": { "version": "3.1.8", @@ -50547,9 +50611,9 @@ } }, "electron-to-chromium": { - "version": "1.4.150", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.150.tgz", - "integrity": "sha512-MP3oBer0X7ZeS9GJ0H6lmkn561UxiwOIY9TTkdxVY7lI9G6GVCKfgJaHaDcakwdKxBXA4T3ybeswH/WBIN/KTA==" + "version": "1.4.177", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.177.tgz", + "integrity": "sha512-FYPir3NSBEGexSZUEeht81oVhHfLFl6mhUKSkjHN/iB/TwEIt/WHQrqVGfTLN5gQxwJCQkIJBe05eOXjI7omgg==" }, "elliptic": { "version": "6.5.4", @@ -50590,7 +50654,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true + "devOptional": true }, "encoding": { "version": "0.1.13", @@ -50622,9 +50686,9 @@ } }, "enhanced-resolve": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", - "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", + "integrity": "sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ==", "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -50885,7 +50949,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true + "devOptional": true }, "escape-string-regexp": { "version": "1.0.5", @@ -50951,7 +51015,7 @@ "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", "dev": true, "requires": { "prelude-ls": "~1.1.2" @@ -51281,7 +51345,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true + "devOptional": true }, "esquery": { "version": "1.4.0", @@ -51336,14 +51400,14 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true + "devOptional": true }, "ethers": { - "version": "5.6.8", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.8.tgz", - "integrity": "sha512-YxIGaltAOdvBFPZwIkyHnXbW40f1r8mHUgapW6dxkO+6t7H6wY8POUn0Kbxrd/N7I4hHxyi7YCddMAH/wmho2w==", + "version": "5.6.9", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.6.9.tgz", + "integrity": "sha512-lMGC2zv9HC5EC+8r429WaWu3uWJUCgUCt8xxKCFqkrFuBDZXDYIdzDUECxzjf2BMF8IVBByY1EBoGSL3RTm8RA==", "requires": { - "@ethersproject/abi": "5.6.3", + "@ethersproject/abi": "5.6.4", "@ethersproject/abstract-provider": "5.6.1", "@ethersproject/abstract-signer": "5.6.2", "@ethersproject/address": "5.6.1", @@ -51358,7 +51422,7 @@ "@ethersproject/json-wallets": "5.6.1", "@ethersproject/keccak256": "5.6.1", "@ethersproject/logger": "5.6.0", - "@ethersproject/networks": "5.6.3", + "@ethersproject/networks": "5.6.4", "@ethersproject/pbkdf2": "5.6.1", "@ethersproject/properties": "5.6.0", "@ethersproject/providers": "5.6.8", @@ -51382,9 +51446,9 @@ "dev": true }, "eventemitter2": { - "version": "6.4.5", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.5.tgz", - "integrity": "sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw==", + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.6.tgz", + "integrity": "sha512-OHqo4wbHX5VbvlbB6o6eDwhYmiTjrpWACjF8Pmof/GTD6rdBNdZFNck3xlhqOiQFGCOoq3uzHvA0cQpFHIGVAQ==", "dev": true }, "eventemitter3": { @@ -51574,7 +51638,7 @@ "version": "4.18.1", "resolved": "https://registry.npmjs.org/express/-/express-4.18.1.tgz", "integrity": "sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q==", - "dev": true, + "devOptional": true, "requires": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -51613,13 +51677,13 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true + "devOptional": true }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "devOptional": true, "requires": { "ms": "2.0.0" } @@ -51628,19 +51692,19 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true + "devOptional": true }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "devOptional": true }, "qs": { "version": "6.10.3", "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", - "dev": true, + "devOptional": true, "requires": { "side-channel": "^1.0.4" } @@ -51921,7 +51985,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, + "devOptional": true, "requires": { "to-regex-range": "^5.0.1" } @@ -51930,7 +51994,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, + "devOptional": true, "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -51945,7 +52009,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "devOptional": true, "requires": { "ms": "2.0.0" } @@ -51954,7 +52018,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "devOptional": true } } }, @@ -51986,36 +52050,36 @@ } }, "firebase": { - "version": "9.8.2", - "resolved": "https://registry.npmjs.org/firebase/-/firebase-9.8.2.tgz", - "integrity": "sha512-cVPpiR18vsLuGWAAVkVhNO6mYsEgYBqawvMI2zxKo2FCtneyBgMwOyWKI8VyCmL5ze5p5QJTPjkoatM6rZkd0Q==", - "requires": { - "@firebase/analytics": "0.7.9", - "@firebase/analytics-compat": "0.1.10", - "@firebase/app": "0.7.25", - "@firebase/app-check": "0.5.8", - "@firebase/app-check-compat": "0.2.8", - "@firebase/app-compat": "0.1.26", + "version": "9.8.4", + "resolved": "https://registry.npmjs.org/firebase/-/firebase-9.8.4.tgz", + "integrity": "sha512-fQigVEtSBprGBDLVTr485KQJ1YUWh/HeocMQvmhaUCL9dHUnW8GWfK+XkKOV2kcDB1Ur8xZPkjCxlmoTcykhgA==", + "requires": { + "@firebase/analytics": "0.7.11", + "@firebase/analytics-compat": "0.1.12", + "@firebase/app": "0.7.27", + "@firebase/app-check": "0.5.10", + "@firebase/app-check-compat": "0.2.10", + "@firebase/app-compat": "0.1.28", "@firebase/app-types": "0.7.0", - "@firebase/auth": "0.20.2", - "@firebase/auth-compat": "0.2.15", - "@firebase/database": "0.13.0", - "@firebase/database-compat": "0.2.0", - "@firebase/firestore": "3.4.9", - "@firebase/firestore-compat": "0.1.18", - "@firebase/functions": "0.8.1", - "@firebase/functions-compat": "0.2.1", - "@firebase/installations": "0.5.9", - "@firebase/messaging": "0.9.13", - "@firebase/messaging-compat": "0.1.13", - "@firebase/performance": "0.5.9", - "@firebase/performance-compat": "0.1.9", + "@firebase/auth": "0.20.4", + "@firebase/auth-compat": "0.2.17", + "@firebase/database": "0.13.2", + "@firebase/database-compat": "0.2.2", + "@firebase/firestore": "3.4.11", + "@firebase/firestore-compat": "0.1.20", + "@firebase/functions": "0.8.3", + "@firebase/functions-compat": "0.2.3", + "@firebase/installations": "0.5.11", + "@firebase/messaging": "0.9.15", + "@firebase/messaging-compat": "0.1.15", + "@firebase/performance": "0.5.11", + "@firebase/performance-compat": "0.1.11", "@firebase/polyfill": "0.3.36", - "@firebase/remote-config": "0.3.8", - "@firebase/remote-config-compat": "0.1.9", - "@firebase/storage": "0.9.6", - "@firebase/storage-compat": "0.1.14", - "@firebase/util": "1.6.0" + "@firebase/remote-config": "0.3.10", + "@firebase/remote-config-compat": "0.1.11", + "@firebase/storage": "0.9.8", + "@firebase/storage-compat": "0.1.16", + "@firebase/util": "1.6.2" } }, "firebase-tools": { @@ -63408,9 +63472,9 @@ } }, "flatted": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", - "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.6.tgz", + "integrity": "sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==", "dev": true }, "flatten": { @@ -63464,7 +63528,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true + "devOptional": true }, "fraction.js": { "version": "4.2.0", @@ -63486,7 +63550,7 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true + "devOptional": true }, "fs-constants": { "version": "1.0.0", @@ -63498,7 +63562,7 @@ "version": "10.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dev": true, + "devOptional": true, "requires": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -63509,7 +63573,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, + "devOptional": true, "requires": { "minipass": "^3.0.0" } @@ -63676,7 +63740,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, + "devOptional": true, "requires": { "is-glob": "^4.0.1" } @@ -64019,7 +64083,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, + "devOptional": true, "requires": { "depd": "2.0.0", "inherits": "2.0.4", @@ -64032,14 +64096,14 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true + "devOptional": true } } }, "http-parser-js": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.6.tgz", - "integrity": "sha512-vDlkRPDJn93swjcjqMSaGSPABbIarsr1TLAui/gLDXzV5VsJNdXNzMYDyNBLQkjWQCJ1uizu8T2oDMhmGt0PRA==" + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz", + "integrity": "sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==" }, "http-proxy": { "version": "1.18.1", @@ -64177,7 +64241,7 @@ "to-regex-range": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", "dev": true, "requires": { "is-number": "^3.0.0", @@ -64533,7 +64597,7 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true + "devOptional": true }, "is-absolute-url": { "version": "3.0.3", @@ -64577,7 +64641,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, + "devOptional": true, "requires": { "binary-extensions": "^2.0.0" } @@ -64689,7 +64753,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true + "devOptional": true }, "is-fullwidth-code-point": { "version": "3.0.0", @@ -64714,7 +64778,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, + "devOptional": true, "requires": { "is-extglob": "^2.1.1" } @@ -64764,7 +64828,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true + "devOptional": true }, "is-number-object": { "version": "1.0.7", @@ -64949,7 +65013,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "devOptional": true }, "isobject": { "version": "3.0.1", @@ -66474,7 +66538,7 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, + "devOptional": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -66617,7 +66681,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, + "devOptional": true, "requires": { "graceful-fs": "^4.1.6", "universalify": "^2.0.0" @@ -66806,7 +66870,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true + "devOptional": true }, "levn": { "version": "0.4.1", @@ -67099,9 +67163,9 @@ } }, "logform": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.4.0.tgz", - "integrity": "sha512-CPSJw4ftjf517EhXZGGvTHHkYobo7ZCc0kvwUoOYcjfR2UVrI66RHj8MCrfAdEitdmFqbu2BYdYs8FHHZSb6iw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.4.1.tgz", + "integrity": "sha512-7XB/tqc3VRbri9pRjU6E97mQ8vC27ivJ3lct4jhyT+n0JNDd4YKldFl0D75NqDp46hk8RC7Ma1Vjv/UPf67S+A==", "requires": { "@colors/colors": "1.5.0", "fecha": "^4.2.0", @@ -67268,7 +67332,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true + "devOptional": true }, "mem": { "version": "8.1.1", @@ -67289,12 +67353,12 @@ } }, "memfs": { - "version": "3.4.4", - "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.4.tgz", - "integrity": "sha512-W4gHNUE++1oSJVn8Y68jPXi+mkx3fXR5ITE/Ubz6EQ3xRpCN5k2CQ4AUR8094Z7211F876TyoBACGsIveqgiGA==", + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.7.tgz", + "integrity": "sha512-ygaiUSNalBX85388uskeCyhSAoOSgzBbtVCr9jA2RROssFL9Q19/ZXFqS+2Th2sr1ewNIWgFdLzLC3Yl1Zv+lw==", "dev": true, "requires": { - "fs-monkey": "1.0.3" + "fs-monkey": "^1.0.3" } }, "memory-fs": { @@ -67376,7 +67440,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true + "devOptional": true }, "merge-source-map": { "version": "1.1.0", @@ -67410,7 +67474,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true + "devOptional": true }, "micromatch": { "version": "4.0.5", @@ -67435,7 +67499,7 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true + "devOptional": true }, "mime-db": { "version": "1.52.0", @@ -67536,7 +67600,7 @@ "version": "1.2.6", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", - "dev": true + "devOptional": true }, "minimist-options": { "version": "4.1.0", @@ -67550,10 +67614,10 @@ } }, "minipass": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz", - "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==", - "dev": true, + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz", + "integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==", + "devOptional": true, "requires": { "yallist": "^4.0.0" } @@ -67620,7 +67684,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dev": true, + "devOptional": true, "requires": { "minipass": "^3.0.0", "yallist": "^4.0.0" @@ -67646,7 +67710,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true + "devOptional": true }, "modern-normalize": { "version": "1.1.0", @@ -67744,7 +67808,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true + "devOptional": true }, "neo-async": { "version": "2.6.2", @@ -67870,17 +67934,17 @@ "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" }, "whatwg-url": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "requires": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -67913,9 +67977,9 @@ } }, "node-gyp-build": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.4.0.tgz", - "integrity": "sha512-amJnQCcgtRVw9SvoebO3BKGESClrfXGCUTX9hSn1OuGQTQBOZmVd0Z0OlecpuRksKvbsUqALE8jls/ErClAPuQ==" + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", + "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==" }, "node-int64": { "version": "0.4.0", @@ -67962,7 +68026,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true + "devOptional": true }, "normalize-range": { "version": "0.1.2", @@ -68086,9 +68150,9 @@ "dev": true }, "nwsapi": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", - "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.1.tgz", + "integrity": "sha512-JYOWTeFoS0Z93587vRJgASD5Ut11fYl5NyihP3KrYBvMe1FRRs6RN7m20SA/16GM4P6hTnZjT+UmDOt38UeXNg==", "dev": true }, "nx": { @@ -68237,7 +68301,7 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, + "devOptional": true, "requires": { "ee-first": "1.1.1" } @@ -68585,7 +68649,7 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true + "devOptional": true }, "pascalcase": { "version": "0.1.1", @@ -68625,7 +68689,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true + "devOptional": true }, "path-parse": { "version": "1.0.7", @@ -68637,7 +68701,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true + "devOptional": true }, "path-type": { "version": "4.0.0", @@ -68686,7 +68750,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true + "devOptional": true }, "pify": { "version": "2.3.0", @@ -68779,7 +68843,7 @@ "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", - "dev": true, + "devOptional": true, "requires": { "async": "^2.6.2", "debug": "^3.1.1", @@ -68790,7 +68854,7 @@ "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, + "devOptional": true, "requires": { "lodash": "^4.17.14" } @@ -68799,7 +68863,7 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, + "devOptional": true, "requires": { "ms": "^2.1.1" } @@ -68808,7 +68872,7 @@ "version": "0.5.6", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, + "devOptional": true, "requires": { "minimist": "^1.2.6" } @@ -69678,9 +69742,9 @@ } }, "postcss-merge-longhand": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.5.tgz", - "integrity": "sha512-NOG1grw9wIO+60arKa2YYsrbgvP6tp+jqc7+ZD5/MalIw234ooH2C6KlR6FEn4yle7GqZoBxSK1mLBE9KPur6w==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz", + "integrity": "sha512-6C/UGF/3T5OE2CEbOuX7iNO63dnvqhGZeUnKkDeifebY0XqkkvrctYSZurpNE902LDf2yKwwPFgotnfSoPhQiw==", "dev": true, "requires": { "postcss-value-parser": "^4.2.0", @@ -69834,18 +69898,18 @@ } }, "postcss-normalize-positions": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.0.tgz", - "integrity": "sha512-8gmItgA4H5xiUxgN/3TVvXRoJxkAWLW6f/KKhdsH03atg0cB8ilXnrB5PpSshwVu/dD2ZsRFQcR1OEmSBDAgcQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz", + "integrity": "sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==", "dev": true, "requires": { "postcss-value-parser": "^4.2.0" } }, "postcss-normalize-repeat-style": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.0.tgz", - "integrity": "sha512-IR3uBjc+7mcWGL6CtniKNQ4Rr5fTxwkaDHwMBDGGs1x9IVRkYIT/M4NelZWkAOBdV6v3Z9S46zqaKGlyzHSchw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz", + "integrity": "sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==", "dev": true, "requires": { "postcss-value-parser": "^4.2.0" @@ -69899,9 +69963,9 @@ } }, "postcss-ordered-values": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.2.tgz", - "integrity": "sha512-wr2avRbW4HS2XE2ZCqpfp4N/tDC6GZKZ+SVP8UBTOVS8QWrc4TD8MYrebJrvVVlGPKszmiSCzue43NDiVtgDmg==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz", + "integrity": "sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==", "dev": true, "requires": { "cssnano-utils": "^3.1.0", @@ -70336,9 +70400,9 @@ "dev": true }, "prettier": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz", - "integrity": "sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", + "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", "dev": true }, "pretty-bytes": { @@ -70387,7 +70451,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true + "devOptional": true }, "promise-inflight": { "version": "1.0.1", @@ -70451,9 +70515,9 @@ }, "dependencies": { "@types/node": { - "version": "17.0.41", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.41.tgz", - "integrity": "sha512-xA6drNNeqb5YyV5fO3OAEsnXLfO7uF0whiOfPTz5AeDo8KeZFmODKnvwPymMNO8qE/an8pVY/O50tig2SQCrGw==" + "version": "18.0.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.1.tgz", + "integrity": "sha512-CmR8+Tsy95hhwtZBKJBs0/FFq4XX7sDZHlGGf+0q+BRZfMbOTkzkj0AFAuTyXbObDIoanaBBW0+KEW+m3N16Wg==" } } }, @@ -70461,7 +70525,7 @@ "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, + "devOptional": true, "requires": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" @@ -70595,13 +70659,13 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true + "devOptional": true }, "raw-body": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dev": true, + "devOptional": true, "requires": { "bytes": "3.1.2", "http-errors": "2.0.0", @@ -70747,7 +70811,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, + "devOptional": true, "requires": { "picomatch": "^2.2.1" } @@ -70855,9 +70919,9 @@ "dev": true }, "regexpu-core": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz", - "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz", + "integrity": "sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA==", "dev": true, "requires": { "regenerate": "^1.4.2", @@ -71065,7 +71129,7 @@ "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "dev": true + "devOptional": true }, "reusify": { "version": "1.0.4", @@ -71109,9 +71173,9 @@ } }, "rollup": { - "version": "2.75.6", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.6.tgz", - "integrity": "sha512-OEf0TgpC9vU6WGROJIk1JA3LR5vk/yvqlzxqdrE2CzzXnqKXNzbAwlWUXis8RS3ZPe7LAq+YUxsRa0l3r27MLA==", + "version": "2.75.7", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.7.tgz", + "integrity": "sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ==", "dev": true, "requires": { "fsevents": "~2.3.2" @@ -71464,7 +71528,7 @@ "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, + "devOptional": true, "requires": { "debug": "2.6.9", "depd": "2.0.0", @@ -71485,7 +71549,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, + "devOptional": true, "requires": { "ms": "2.0.0" }, @@ -71494,7 +71558,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "devOptional": true } } }, @@ -71502,13 +71566,13 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true + "devOptional": true }, "ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "devOptional": true } } }, @@ -71586,7 +71650,7 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, + "devOptional": true, "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -71638,7 +71702,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true + "devOptional": true }, "sha.js": { "version": "2.4.11", @@ -71683,7 +71747,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, + "devOptional": true, "requires": { "shebang-regex": "^3.0.0" } @@ -71692,7 +71756,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true + "devOptional": true }, "side-channel": { "version": "1.0.4", @@ -72184,7 +72248,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true + "devOptional": true }, "sshpk": { "version": "1.17.0", @@ -72206,7 +72270,7 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true } } @@ -72330,7 +72394,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true + "devOptional": true }, "stream-browserify": { "version": "3.0.0", @@ -72743,7 +72807,7 @@ "version": "6.1.11", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "dev": true, + "devOptional": true, "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -72870,7 +72934,7 @@ "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, "throat": { @@ -72882,13 +72946,13 @@ "throttleit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", - "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw=", + "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", "dev": true }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" }, "through2": { "version": "4.0.2", @@ -72934,13 +72998,13 @@ "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", "dev": true }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", - "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "integrity": "sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==", "dev": true, "requires": { "kind-of": "^3.0.2" @@ -72973,7 +73037,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, + "devOptional": true, "requires": { "is-number": "^7.0.0" } @@ -72982,7 +73046,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true + "devOptional": true }, "tough-cookie": { "version": "2.5.0", @@ -73141,7 +73205,7 @@ "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", "dev": true, "requires": { "safe-buffer": "^5.0.1" @@ -73176,7 +73240,7 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, + "devOptional": true, "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -73270,7 +73334,7 @@ "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==", "dev": true }, "unique-filename": { @@ -73295,7 +73359,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "dev": true + "devOptional": true }, "unorm": { "version": "1.6.0", @@ -73306,13 +73370,13 @@ "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "dev": true + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "devOptional": true }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", - "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "integrity": "sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==", "dev": true, "requires": { "has-value": "^0.3.1", @@ -73380,6 +73444,15 @@ "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", "dev": true }, + "update-browserslist-db": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.4.tgz", + "integrity": "sha512-jnmO2BEGUjsMOe/Fg9u0oczOe/ppIDZPebzccl1yDWGLFP16Pa1/RM5wEoKYPG2zstNcDuAStejyxsOuKINdGA==", + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -73391,13 +73464,13 @@ "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", "dev": true }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "integrity": "sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==", "dev": true, "requires": { "punycode": "1.3.2", @@ -73450,19 +73523,19 @@ "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "devOptional": true }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true + "devOptional": true }, "v8-compile-cache": { "version": "2.3.0", @@ -73494,7 +73567,7 @@ "validate-npm-package-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", - "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "integrity": "sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw==", "dev": true, "requires": { "builtins": "^1.0.3" @@ -73503,13 +73576,13 @@ "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "devOptional": true }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", "dev": true, "requires": { "assert-plus": "^1.0.0", @@ -73565,7 +73638,7 @@ "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", "requires": { "defaults": "^1.0.3" } @@ -74224,7 +74297,7 @@ "to-regex-range": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", - "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "integrity": "sha512-ZZWNfCjUokXXDGXFpZehJIkZqq91BcULFq/Pi7M5i4JnxXdhMKAK682z8bCW3o8Hj1wuuzoKcW3DfVzaP6VuNg==", "dev": true, "requires": { "is-number": "^3.0.0", @@ -74428,7 +74501,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, + "devOptional": true, "requires": { "isexe": "^2.0.0" } @@ -74448,7 +74521,7 @@ "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", "dev": true }, "which-typed-array": { @@ -74476,7 +74549,7 @@ "wif": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/wif/-/wif-2.0.6.tgz", - "integrity": "sha1-CNP1IFbGZnkplyb63g1DKudLRwQ=", + "integrity": "sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ==", "requires": { "bs58check": "<3.0.0" } @@ -74488,9 +74561,9 @@ "dev": true }, "winston": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.7.2.tgz", - "integrity": "sha512-QziIqtojHBoyzUOdQvQiar1DH0Xp9nF1A1y7NVy2DGEsz82SBDtOalS0ulTRGVT14xPX3WRWkCsdcJKqNflKng==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.8.1.tgz", + "integrity": "sha512-r+6YAiCR4uI3N8eQNOg8k3P3PqwAm20cLKlzVD9E66Ch39+LZC+VH1UKf9JemQj2B3QoUHfKD7Poewn0Pr3Y1w==", "requires": { "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", @@ -74556,7 +74629,7 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" }, "write-file-atomic": { "version": "3.0.3", @@ -74650,7 +74723,7 @@ "yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", + "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, "requires": { "buffer-crc32": "~0.2.3", @@ -74682,9 +74755,9 @@ } }, "zone.js": { - "version": "0.11.5", - "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.11.5.tgz", - "integrity": "sha512-D1/7VxEuQ7xk6z/kAROe4SUbd9CzxY4zOwVGnGHerd/SgLIVU5f4esDzQUsOCeArn933BZfWMKydH7l7dPEp0g==", + "version": "0.11.6", + "resolved": "https://registry.npmjs.org/zone.js/-/zone.js-0.11.6.tgz", + "integrity": "sha512-umJqFtKyZlPli669gB1gOrRE9hxUUGkZr7mo878z+NEBJZZixJkKeVYfnoLa7g25SseUDc92OZrMKKHySyJrFg==", "requires": { "tslib": "^2.3.0" } diff --git a/package.json b/package.json index 2d5ab7cf2..b01e16d89 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.46.0-rc2", + "@cosmos-client/core": "0.46.0-rc2", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -78,7 +78,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.3.0", - "ununifi-client": "^0.46.0-rc2", + "ununifi-client": "0.46.0-rc2", "zone.js": "~0.11.4" }, "devDependencies": { From 5e3caeecf3fc95fa39cdc7018f55627829cc3a92 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Mon, 4 Jul 2022 10:28:02 +0900 Subject: [PATCH 36/77] fix: add node type to portal tsconfig.spec.json --- projects/portal/tsconfig.spec.json | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/projects/portal/tsconfig.spec.json b/projects/portal/tsconfig.spec.json index 5fe42a30c..9248b08c3 100644 --- a/projects/portal/tsconfig.spec.json +++ b/projects/portal/tsconfig.spec.json @@ -3,17 +3,9 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "../../out-tsc/spec", - "types": [ - "jest" - ], + "types": ["jest", "node"], "esModuleInterop": true }, - "files": [ - "src/setup-jest.ts", - "src/polyfills.ts" - ], - "include": [ - "src/**/*.spec.ts", - "src/**/*.d.ts" - ] + "files": ["src/setup-jest.ts", "src/polyfills.ts"], + "include": ["src/**/*.spec.ts", "src/**/*.d.ts"] } From 191258cf3b7cdbbca683f3da3dafccd10a504903 Mon Sep 17 00:00:00 2001 From: taro04 Date: Mon, 4 Jul 2022 21:41:17 +0900 Subject: [PATCH 37/77] feat: fix jest config --- projects/portal/jest.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/portal/jest.config.js b/projects/portal/jest.config.js index 0b5ec088d..2d4894dce 100644 --- a/projects/portal/jest.config.js +++ b/projects/portal/jest.config.js @@ -1,5 +1,5 @@ module.exports = { preset: 'jest-preset-angular', setupFilesAfterEnv: ['/projects/portal/src/setup-jest.ts'], - testPathIgnorePatterns: ['/node_modules/', '/projects/explorer/cypress/'], + testPathIgnorePatterns: ['/node_modules/', '/projects/portal/cypress/'], }; From 1c378b2e16a9de789d012ea6b9189f462f12c425 Mon Sep 17 00:00:00 2001 From: taro04 Date: Tue, 5 Jul 2022 19:20:20 +0900 Subject: [PATCH 38/77] feat: strictly set the ver of the original package --- package-lock.json | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index d31779813..a6bf94448 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.46.0-rc7", + "@cosmos-client/core": "0.46.0-rc7", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -47,7 +47,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.3.0", - "ununifi-client": "^0.46.0-rc4", + "ununifi-client": "0.46.0-rc4", "zone.js": "~0.11.4" }, "devDependencies": { diff --git a/package.json b/package.json index ae4b2647a..9d0037a6a 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@angular/platform-browser-dynamic": "~12.2.0", "@angular/router": "~12.2.0", "@apollo/client": "^3.0.0", - "@cosmos-client/core": "^0.46.0-rc7", + "@cosmos-client/core": "0.46.0-rc7", "@metamask/detect-provider": "^1.2.0", "@ngneat/tailwind": "^7.0.3", "@ngrx/effects": "^12.4.0", @@ -78,7 +78,7 @@ "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.3.0", - "ununifi-client": "^0.46.0-rc4", + "ununifi-client": "0.46.0-rc4", "zone.js": "~0.11.4" }, "devDependencies": { From 9709354b47c25b93a3cc6fcc509389653c9bbc27 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:10:19 +0900 Subject: [PATCH 39/77] fix: [shared] nft component spec --- .../shared/src/lib/views/nfts/nft/nft.component.spec.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/shared/src/lib/views/nfts/nft/nft.component.spec.ts b/projects/shared/src/lib/views/nfts/nft/nft.component.spec.ts index 41a2374e1..c9ac6602d 100644 --- a/projects/shared/src/lib/views/nfts/nft/nft.component.spec.ts +++ b/projects/shared/src/lib/views/nfts/nft/nft.component.spec.ts @@ -1,9 +1,13 @@ +import { NftTxApplicationService } from '../../../models/ununifi/tx/nft/nft-tx.application.service'; import { LibViewNftComponent } from './nft.component'; import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { MatCardModule } from '@angular/material/card'; import { MatDialogModule } from '@angular/material/dialog'; import { MatSnackBarModule } from '@angular/material/snack-bar'; import { RouterTestingModule } from '@angular/router/testing'; +jest.mock('../../../models/ununifi/tx/nft/nft-tx.application.service'); + describe('LibViewNftComponent', () => { let component: LibViewNftComponent; let fixture: ComponentFixture; @@ -11,7 +15,8 @@ describe('LibViewNftComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [LibViewNftComponent], - imports: [RouterTestingModule, MatSnackBarModule, MatDialogModule], + imports: [RouterTestingModule, MatSnackBarModule, MatDialogModule, MatCardModule], + providers: [NftTxApplicationService], }).compileComponents(); }); From abe0d5da76c151bc7493a7ec804eb35a5c6e29d4 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:10:19 +0900 Subject: [PATCH 40/77] chore: add jest setting for vscode --- .vscode/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index c2f1cbf3b..1ca88c58e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,5 +5,6 @@ "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, - "ngschematics.schematics": ["./node_modules/angular-firebase-schematics/src/collection.json"] + "ngschematics.schematics": ["./node_modules/angular-firebase-schematics/src/collection.json"], + "jest.jestCommandLine": "ng test" } From ed8396b17e2bd7fccfe3dc34b7b28a2f074e5b69 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:10:19 +0900 Subject: [PATCH 41/77] fix: shared tsconfig.spec.json --- projects/shared/tsconfig.spec.json | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/projects/shared/tsconfig.spec.json b/projects/shared/tsconfig.spec.json index 78b441914..a84b01f4f 100644 --- a/projects/shared/tsconfig.spec.json +++ b/projects/shared/tsconfig.spec.json @@ -3,16 +3,9 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "../../out-tsc/spec", - "types": [ - "jest" - ], + "types": ["jest", "node"], "esModuleInterop": true }, - "files": [ - "src/setup-jest.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] + "files": ["src/setup-jest.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] } From 41f25662e146a56af307dd2ac06980259df9861f Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:13:13 +0900 Subject: [PATCH 42/77] fix: add test to converter --- projects/shared/src/lib/utils/Account.ts | 23 +++ .../shared/src/lib/utils/converter.spec.ts | 141 ++++++++++++++++++ projects/shared/src/lib/utils/converter.ts | 102 ++++++------- 3 files changed, 215 insertions(+), 51 deletions(-) create mode 100644 projects/shared/src/lib/utils/Account.ts create mode 100644 projects/shared/src/lib/utils/converter.spec.ts diff --git a/projects/shared/src/lib/utils/Account.ts b/projects/shared/src/lib/utils/Account.ts new file mode 100644 index 000000000..45db11483 --- /dev/null +++ b/projects/shared/src/lib/utils/Account.ts @@ -0,0 +1,23 @@ +import cosmosClient from '@cosmos-client/core'; + +export type BaseAccount = cosmosClient.proto.cosmos.auth.v1beta1.BaseAccount; +export const BaseAccount = cosmosClient.proto.cosmos.auth.v1beta1.BaseAccount; +export type BaseVestingAccount = cosmosClient.proto.cosmos.vesting.v1beta1.BaseVestingAccount; +export const BaseVestingAccount = cosmosClient.proto.cosmos.vesting.v1beta1.BaseVestingAccount; +export type ContinuousVestingAccount = + cosmosClient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount; +export const ContinuousVestingAccount = + cosmosClient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount; +export type DelayedVestingAccount = cosmosClient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount; +export const DelayedVestingAccount = + cosmosClient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount; +export type PeriodicVestingAccount = + cosmosClient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount; +export const PeriodicVestingAccount = + cosmosClient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount; +export type PermanentLockedAccount = + cosmosClient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount; +export const PermanentLockedAccount = + cosmosClient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount; +export type ModuleAccount = cosmosClient.proto.cosmos.auth.v1beta1.ModuleAccount; +export const ModuleAccount = cosmosClient.proto.cosmos.auth.v1beta1.ModuleAccount; diff --git a/projects/shared/src/lib/utils/converter.spec.ts b/projects/shared/src/lib/utils/converter.spec.ts new file mode 100644 index 000000000..5841d9744 --- /dev/null +++ b/projects/shared/src/lib/utils/converter.spec.ts @@ -0,0 +1,141 @@ +import { + BaseAccount, + BaseVestingAccount, + ContinuousVestingAccount, + DelayedVestingAccount, + ModuleAccount, + PeriodicVestingAccount, + PermanentLockedAccount, +} from './Account'; +import { + convertHexStringToUint8Array, + convertTypedAccountToTypedName, + convertUint8ArrayToHexString, + convertUnknownAccountToBaseAccount, + convertUnknownAccountToTypedAccount, +} from './converter'; + +describe('convertHexStringToUint8Array', () => { + it('convert hex string to uint8array', () => { + const hexString = 'bada55'; + const uint8Array = convertHexStringToUint8Array(hexString); + expect(uint8Array).toEqual(new Uint8Array([186, 218, 85])); + }); + + it('returns undefined when passing an empty string', () => { + const hexString = ''; + const uint8Array = convertHexStringToUint8Array(hexString); + expect(uint8Array).toBeUndefined(); + }); +}); + +describe('convertUint8ArrayToHexString', () => { + it('convert uint8array to hex string', () => { + const uint8Array = new Uint8Array([186, 218, 85]); + const hexString = convertUint8ArrayToHexString(uint8Array); + expect(hexString).toEqual('bada55'); + }); + + it('returns empty string when passing an empty uint8array', () => { + const uint8Array = new Uint8Array([]); + const hexString = convertUint8ArrayToHexString(uint8Array); + expect(hexString).toBe(''); + }); +}); + +describe('convertUnknownAccountToTypedAccount', () => { + it('convert unknown account to typed account', () => { + const unknownAccount = new BaseAccount(); + const typedAccount = convertUnknownAccountToTypedAccount(unknownAccount); + expect(typedAccount).toEqual(unknownAccount); + }); + + it('convert invalid data to undefined', () => { + const unknownAccount = 'hoge'; + const typedAccount = convertUnknownAccountToTypedAccount(unknownAccount); + expect(typedAccount).toBeUndefined(); + }); +}); + +describe('convertUnknownAccountToBaseAccount', () => { + const setup = () => { + const baseAccount = new BaseAccount({ address: '0x123' }); + const baseVestingAccount = new BaseVestingAccount({ base_account: baseAccount }); + return { baseAccount, baseVestingAccount }; + }; + + it('convert BaseAccount to base account', () => { + const { baseAccount } = setup(); + const typedAccount = convertUnknownAccountToBaseAccount(baseAccount); + expect(typedAccount).toEqual(baseAccount); + expect(typedAccount?.address).toBe(baseAccount.address); + }); + + it('convert BaseVestingAccount to base account', () => { + const { baseAccount, baseVestingAccount } = setup(); + const typedAccount = convertUnknownAccountToBaseAccount(baseVestingAccount); + expect(typedAccount).toEqual(baseAccount); + expect(typedAccount?.address).toBe(baseAccount.address); + }); + + it('convert PermanentLockedAccount to base account', () => { + const { baseAccount } = setup(); + const unknownAccount = new ModuleAccount({ + base_account: baseAccount, + }); + const typedAccount = convertUnknownAccountToBaseAccount(unknownAccount); + expect(typedAccount).toEqual(baseAccount); + expect(typedAccount?.address).toBe(baseAccount.address); + }); + + it.each` + Account + ${ContinuousVestingAccount} + ${DelayedVestingAccount} + ${PeriodicVestingAccount} + ${PermanentLockedAccount} + `('convert $Account to base account', ({ Account }) => { + const { baseAccount, baseVestingAccount } = setup(); + const unknownAccount = new Account({ base_vesting_account: baseVestingAccount }); + const typedAccount = convertUnknownAccountToBaseAccount(unknownAccount); + expect(typedAccount).toEqual(baseAccount); + expect(typedAccount?.address).toBe(baseAccount.address); + }); + + it.each` + arg | expected + ${'hoge'} | ${undefined} + ${undefined} | ${undefined} + ${null} | ${null} + `('convert $arg to $expected', ({ arg, expected }) => { + const typedAccount = convertUnknownAccountToBaseAccount(arg); + expect(typedAccount).toEqual(expected); + }); +}); + +describe('convertTypedAccountToTypedName', () => { + it.each` + Account | name + ${BaseAccount} | ${'BaseAccount'} + ${BaseVestingAccount} | ${'BaseVestingAccount'} + ${ContinuousVestingAccount} | ${'ContinuousVestingAccount'} + ${DelayedVestingAccount} | ${'DelayedVestingAccount'} + ${PeriodicVestingAccount} | ${'PeriodicVestingAccount'} + ${PermanentLockedAccount} | ${'PermanentLockedAccount'} + ${ModuleAccount} | ${'ModuleAccount'} + `('convert $Account to $name', ({ Account, name }) => { + const account = new Account(); + const typedAccount = convertTypedAccountToTypedName(account); + expect(typedAccount).toEqual(name); + }); + + it.each` + arg | expected + ${'hoge'} | ${undefined} + ${undefined} | ${undefined} + ${null} | ${null} + `('convert $arg to $expected', ({ arg, expected }) => { + const typedAccount = convertTypedAccountToTypedName(arg); + expect(typedAccount).toEqual(expected); + }); +}); diff --git a/projects/shared/src/lib/utils/converter.ts b/projects/shared/src/lib/utils/converter.ts index eb2ca6ab8..00cd4e2cf 100644 --- a/projects/shared/src/lib/utils/converter.ts +++ b/projects/shared/src/lib/utils/converter.ts @@ -1,4 +1,12 @@ -import cosmosclient from '@cosmos-client/core'; +import { + BaseAccount, + BaseVestingAccount, + ContinuousVestingAccount, + DelayedVestingAccount, + ModuleAccount, + PeriodicVestingAccount, + PermanentLockedAccount, +} from './Account'; export const convertHexStringToUint8Array = (hexString: string): Uint8Array | undefined => { try { @@ -28,28 +36,28 @@ export const convertUint8ArrayToHexString = (uint8Array: Uint8Array): string | u export const convertUnknownAccountToTypedAccount = ( unknownAccount: unknown, ): - | cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount - | cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount - | cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount - | cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount - | cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount - | cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount - | cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount + | BaseAccount + | BaseVestingAccount + | ContinuousVestingAccount + | DelayedVestingAccount + | PeriodicVestingAccount + | PermanentLockedAccount + | ModuleAccount | null | undefined => { - if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { + if (unknownAccount instanceof BaseAccount) { return unknownAccount; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount) { + } else if (unknownAccount instanceof BaseVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + } else if (unknownAccount instanceof ContinuousVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { + } else if (unknownAccount instanceof DelayedVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { + } else if (unknownAccount instanceof PeriodicVestingAccount) { return unknownAccount; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { + } else if (unknownAccount instanceof PermanentLockedAccount) { return unknownAccount; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount) { + } else if (unknownAccount instanceof ModuleAccount) { return unknownAccount; } else if (unknownAccount === undefined) { return unknownAccount; @@ -64,51 +72,43 @@ export const convertUnknownAccountToTypedAccount = ( export const convertUnknownAccountToBaseAccount = ( unknownAccount: unknown, -): cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount | null | undefined => { +): BaseAccount | null | undefined => { if (unknownAccount === undefined) { return unknownAccount; } else if (unknownAccount === null) { return unknownAccount; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { + } else if (unknownAccount instanceof BaseAccount) { return unknownAccount; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount) { + } else if (unknownAccount instanceof BaseVestingAccount) { if (unknownAccount.base_account === null) { return undefined; } - return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount(unknownAccount.base_account); - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + return new BaseAccount(unknownAccount.base_account); + } else if (unknownAccount instanceof ContinuousVestingAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( - unknownAccount.base_vesting_account?.base_account, - ); - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { + return new BaseAccount(unknownAccount.base_vesting_account?.base_account); + } else if (unknownAccount instanceof DelayedVestingAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( - unknownAccount.base_vesting_account?.base_account, - ); - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { + return new BaseAccount(unknownAccount.base_vesting_account?.base_account); + } else if (unknownAccount instanceof PeriodicVestingAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( - unknownAccount.base_vesting_account?.base_account, - ); - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { + return new BaseAccount(unknownAccount.base_vesting_account?.base_account); + } else if (unknownAccount instanceof PermanentLockedAccount) { if (unknownAccount.base_vesting_account?.base_account === null) { return undefined; } - return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount( - unknownAccount.base_vesting_account?.base_account, - ); - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount) { + return new BaseAccount(unknownAccount.base_vesting_account?.base_account); + } else if (unknownAccount instanceof ModuleAccount) { if (unknownAccount.base_account === null) { return undefined; } - return new cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount(unknownAccount.base_account); + return new BaseAccount(unknownAccount.base_account); } else { console.error('Unsupported Account!'); console.error(unknownAccount); @@ -118,29 +118,29 @@ export const convertUnknownAccountToBaseAccount = ( export const convertTypedAccountToTypedName = ( unknownAccount: - | cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount - | cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount - | cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount - | cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount - | cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount - | cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount - | cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount + | BaseAccount + | BaseVestingAccount + | ContinuousVestingAccount + | DelayedVestingAccount + | PeriodicVestingAccount + | PermanentLockedAccount + | ModuleAccount | null | undefined, ): string | null | undefined => { - if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) { + if (unknownAccount instanceof BaseAccount) { return 'BaseAccount'; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.BaseVestingAccount) { + } else if (unknownAccount instanceof BaseVestingAccount) { return 'BaseVestingAccount'; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.ContinuousVestingAccount) { + } else if (unknownAccount instanceof ContinuousVestingAccount) { return 'ContinuousVestingAccount'; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.DelayedVestingAccount) { + } else if (unknownAccount instanceof DelayedVestingAccount) { return 'DelayedVestingAccount'; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PeriodicVestingAccount) { + } else if (unknownAccount instanceof PeriodicVestingAccount) { return 'PeriodicVestingAccount'; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.vesting.v1beta1.PermanentLockedAccount) { + } else if (unknownAccount instanceof PermanentLockedAccount) { return 'PermanentLockedAccount'; - } else if (unknownAccount instanceof cosmosclient.proto.cosmos.auth.v1beta1.ModuleAccount) { + } else if (unknownAccount instanceof ModuleAccount) { return 'ModuleAccount'; } else if (unknownAccount === undefined) { return unknownAccount; From 7cae9cb89d4afbefa55a619c71244952e5ab5f47 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:13:16 +0900 Subject: [PATCH 43/77] chore: add "jest" to tsconfig.json --- tsconfig.json | 47 +++++++++++------------------------------------ 1 file changed, 11 insertions(+), 36 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 5ffa5bfa6..14cdfb43c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,45 +14,20 @@ "moduleResolution": "node", "importHelpers": true, "paths": { - "shared": [ - "dist/shared/shared", - "dist/shared" - ], - "shared/*": [ - "dist/shared/shared/*", - "dist/shared/*" - ], - "crypto": [ - "./node_modules/crypto-browserify" - ], - "https": [ - "./node_modules/https-browserify" - ], - "os": [ - "./node_modules/os-browserify" - ], - "stream": [ - "./node_modules/stream-browserify" - ], - "http": [ - "./node_modules/stream-http" - ], - "path": [ - "./node_modules/path-browserify" - ] + "shared": ["dist/shared/shared", "dist/shared"], + "shared/*": ["dist/shared/shared/*", "dist/shared/*"], + "crypto": ["./node_modules/crypto-browserify"], + "https": ["./node_modules/https-browserify"], + "os": ["./node_modules/os-browserify"], + "stream": ["./node_modules/stream-browserify"], + "http": ["./node_modules/stream-http"], + "path": ["./node_modules/path-browserify"] }, "target": "es2017", "module": "es2020", - "lib": [ - "es2020", - "dom", - "esnext.asynciterable" - ], - "types": [ - "node", - "jest" - ], - "allowSyntheticDefaultImports": true + "lib": ["es2020", "dom", "esnext.asynciterable"], + "allowSyntheticDefaultImports": true, + "types": ["node", "jest"] }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, From bf35e515cb9ed1422d85ad2dc51c44359eb3eec0 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:13:16 +0900 Subject: [PATCH 44/77] fix: add test to key --- projects/shared/src/lib/utils/key.spec.ts | 189 ++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 projects/shared/src/lib/utils/key.spec.ts diff --git a/projects/shared/src/lib/utils/key.spec.ts b/projects/shared/src/lib/utils/key.spec.ts new file mode 100644 index 000000000..f22d2c503 --- /dev/null +++ b/projects/shared/src/lib/utils/key.spec.ts @@ -0,0 +1,189 @@ +import { KeyType } from '../../common'; +import { + createCosmosPrivateKeyFromMnemonic, + createCosmosPrivateKeyFromString, + createCosmosPrivateKeyFromUint8Array, + createCosmosPublicKeyFromString, + createCosmosPublicKeyFromUint8Array, + createPrivateKeyFromMnemonic, + createPrivateKeyStringFromMnemonic, +} from './key'; + +const mnemonicString = + 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'; + +describe('createPrivateKeyFromMnemonic', () => { + it('create private key from mnemonic', async () => { + const privateKeyUint8Array = await createPrivateKeyFromMnemonic(mnemonicString); + expect(privateKeyUint8Array).toBeDefined(); + expect(privateKeyUint8Array?.length).toBe(32); + expect(privateKeyUint8Array!.toString()).toMatchInlineSnapshot( + `"196,164,142,47,206,20,129,205,50,148,180,73,15,102,120,9,14,169,141,61,14,92,217,132,85,138,176,150,135,65,177,4"`, + ); + }); + + it.todo( + 'return undefined with invalid mnemonic', + // TODO: There is no mnemonic validation + // + // , async () => { + // const mnemonicString = 'invalid mnemonic'; + // const privateKeyUint8Array = await createPrivateKeyFromMnemonic(mnemonicString); + // expect(privateKeyUint8Array).toBeUndefined(); + // } + ); +}); + +describe('createPrivateKeyStringFromMnemonic', () => { + it('create private key string from mnemonic', async () => { + const privateKeyString = await createPrivateKeyStringFromMnemonic(mnemonicString); + expect(privateKeyString).toBeDefined(); + expect(privateKeyString?.length).toBe(64); + expect(privateKeyString).toMatchInlineSnapshot( + `"c4a48e2fce1481cd3294b4490f6678090ea98d3d0e5cd984558ab0968741b104"`, + ); + }); + + it.todo('return undefined with invalid mnemonic'); +}); + +const secp256k1PrivateKey = + 'cosmospub1addwnpepqf85u2kens6dvzum5c5re9p34pqc47r8xgffv8uh5aakxalu6pdky2qr0sc'; +const ed25519PrivateKey = + 'cosmosvalconspub1zcjduepq7nwscx73mjex20vuf2dnxwzmvn4gkht4sj37nl76akhfd8m46f8s8t9qpl'; + +describe('createCosmosPrivateKeyFromMnemonic', () => { + it.each` + keyType | expected + ${KeyType.secp256k1} | ${secp256k1PrivateKey} + ${KeyType.ed25519} | ${ed25519PrivateKey} + `('($keyType) create cosmos private key from mnemonic ', async ({ keyType, expected }) => { + const cosmosPrivateKey = await createCosmosPrivateKeyFromMnemonic(keyType, mnemonicString); + expect(cosmosPrivateKey).toBeDefined(); + expect(cosmosPrivateKey?.pubKey().accPubkey()).toBe(expected); + }); + + it.each` + keyType | expected + ${KeyType.ethsecp256k1} | ${undefined} + ${KeyType.sr25519} | ${undefined} + `('($keyType) returns undefined', async ({ keyType, expected }) => { + const cosmosPrivateKey = await createCosmosPrivateKeyFromMnemonic(keyType, mnemonicString); + expect(cosmosPrivateKey).toBe(expected); + }); + + it.todo('return undefined with invalid mnemonic'); +}); + +describe('createCosmosPrivateKeyFromUint8Array', () => { + it.each` + keyType | expected + ${KeyType.secp256k1} | ${secp256k1PrivateKey} + ${KeyType.ed25519} | ${ed25519PrivateKey} + `('($keyType) create cosmos private key from uint8 array', async ({ keyType, expected }) => { + const privateKeyUint8Array = await createPrivateKeyFromMnemonic(mnemonicString); + expect(privateKeyUint8Array).toBeDefined(); + const cosmosPrivateKey = createCosmosPrivateKeyFromUint8Array(keyType, privateKeyUint8Array!); + expect(cosmosPrivateKey).toBeDefined(); + expect(cosmosPrivateKey?.pubKey().accPubkey()).toBe(expected); + }); + + it.each` + keyType | expected + ${KeyType.ethsecp256k1} | ${undefined} + ${KeyType.sr25519} | ${undefined} + `('($keyType) returns undefined', async ({ keyType, expected }) => { + const privateKeyUint8Array = await createPrivateKeyFromMnemonic(mnemonicString); + expect(privateKeyUint8Array).toBeDefined(); + const cosmosPrivateKey = createCosmosPrivateKeyFromUint8Array(keyType, privateKeyUint8Array!); + expect(cosmosPrivateKey).toBe(expected); + }); + + it.todo('returns undefined with invalid key type'); +}); + +describe('createCosmosPrivateKeyFromString', () => { + it.each` + keyType | expected + ${KeyType.secp256k1} | ${secp256k1PrivateKey} + ${KeyType.ed25519} | ${ed25519PrivateKey} + `('($keyType) create cosmos private key from string', async ({ keyType, expected }) => { + const privateKeyString = await createPrivateKeyStringFromMnemonic(mnemonicString); + expect(privateKeyString).toBeDefined(); + const cosmosPrivateKey = createCosmosPrivateKeyFromString(keyType, privateKeyString!); + expect(cosmosPrivateKey).toBeDefined(); + expect(cosmosPrivateKey?.pubKey().accPubkey()).toBe(expected); + }); + + it.each` + keyType | expected + ${KeyType.ethsecp256k1} | ${undefined} + ${KeyType.sr25519} | ${undefined} + `('($keyType) returns undefined', async ({ keyType, expected }) => { + const privateKeyString = await createPrivateKeyStringFromMnemonic(mnemonicString); + expect(privateKeyString).toBeDefined(); + const cosmosPrivateKey = createCosmosPrivateKeyFromString(keyType, privateKeyString!); + expect(cosmosPrivateKey).toBe(expected); + }); + + it.todo('returns undefined with invalid key type'); +}); + +const secp256k1PublicKey = + 'cosmospub1addwnpepcjjgut7wzjqu6v55k3ys7encpy82nrfapewdnpz432cfdp6pkyzqn773wr'; +const ed25519PublicKey = + 'cosmosvalconspub1zcjduepqcjjgut7wzjqu6v55k3ys7encpy82nrfapewdnpz432cfdp6pkyzqx7dg6p'; + +describe('createCosmosPublicKeyFromUint8Array', () => { + it.each` + keyType | expected + ${KeyType.secp256k1} | ${secp256k1PublicKey} + ${KeyType.ed25519} | ${ed25519PublicKey} + `('($keyType) create cosmos public key from uint8 array', async ({ keyType, expected }) => { + const privateKeyUint8Array = await createPrivateKeyFromMnemonic(mnemonicString); + expect(privateKeyUint8Array).toBeDefined(); + const cosmosPublicKey = createCosmosPublicKeyFromUint8Array(keyType, privateKeyUint8Array!); + expect(cosmosPublicKey).toBeDefined(); + expect(cosmosPublicKey?.accPubkey()).toBe(expected); + }); + + it.each` + keyType | expected + ${KeyType.ethsecp256k1} | ${undefined} + ${KeyType.sr25519} | ${undefined} + `('($keyType) returns undefined', async ({ keyType, expected }) => { + const privateKeyUint8Array = await createPrivateKeyFromMnemonic(mnemonicString); + expect(privateKeyUint8Array).toBeDefined(); + const cosmosPublicKey = createCosmosPublicKeyFromUint8Array(keyType, privateKeyUint8Array!); + expect(cosmosPublicKey).toBe(expected); + }); + + it.todo('returns undefined with invalid key type'); +}); + +describe('createCosmosPublicKeyFromString', () => { + it.each` + keyType | expected + ${KeyType.secp256k1} | ${secp256k1PublicKey} + ${KeyType.ed25519} | ${ed25519PublicKey} + `('($keyType) create cosmos public key from string', async ({ keyType, expected }) => { + const privateKeyString = await createPrivateKeyStringFromMnemonic(mnemonicString); + expect(privateKeyString).toBeDefined(); + const cosmosPublicKey = createCosmosPublicKeyFromString(keyType, privateKeyString!); + expect(cosmosPublicKey).toBeDefined(); + expect(cosmosPublicKey?.accPubkey()).toBe(expected); + }); + + it.each` + keyType | expected + ${KeyType.ethsecp256k1} | ${undefined} + ${KeyType.sr25519} | ${undefined} + `('($keyType) returns undefined', async ({ keyType, expected }) => { + const privateKeyString = await createPrivateKeyStringFromMnemonic(mnemonicString); + expect(privateKeyString).toBeDefined(); + const cosmosPublicKey = createCosmosPublicKeyFromString(keyType, privateKeyString!); + expect(cosmosPublicKey).toBe(expected); + }); + + it.todo('returns undefined with invalid key type'); +}); From a069865aa709f7f3d3c2a06bc39be522b6535f97 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:13:16 +0900 Subject: [PATCH 45/77] fix: add test to validation --- .../shared/src/lib/utils/validation.spec.ts | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 projects/shared/src/lib/utils/validation.spec.ts diff --git a/projects/shared/src/lib/utils/validation.spec.ts b/projects/shared/src/lib/utils/validation.spec.ts new file mode 100644 index 000000000..6dc8efdca --- /dev/null +++ b/projects/shared/src/lib/utils/validation.spec.ts @@ -0,0 +1,64 @@ +import { + convertUint8ArrayToHexString, + createCosmosPrivateKeyFromString, + createCosmosPublicKeyFromString, + createPrivateKeyStringFromMnemonic, + KeyType, + StoredWallet, + validatePrivateStoredWallet, + WalletType, +} from '../../common'; +import { cosmosclient } from '@cosmos-client/core'; + +describe('validatePrivateStoredWallet', () => { + const setup = async () => { + const mnemonicString = + 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about'; + const privateKeyString = await createPrivateKeyStringFromMnemonic(mnemonicString); + const cosmosPrivateKey = createCosmosPrivateKeyFromString(KeyType.ed25519, privateKeyString!); + const publicKeyString = convertUint8ArrayToHexString(cosmosPrivateKey?.pubKey().bytes()!); + const cosmosPublicKey = createCosmosPublicKeyFromString(KeyType.ed25519, publicKeyString!); + const address = cosmosclient.AccAddress.fromPublicKey(cosmosPublicKey!).toString(); + + const privateStoredWallet: StoredWallet & { privateKey: string } = { + id: '', + type: WalletType.ununifi, + key_type: KeyType.ed25519, + privateKey: privateKeyString!, + public_key: publicKeyString!, + address: address, + }; + return { privateStoredWallet, privateKeyString }; + }; + + it('returns true if the target has the valid value', async () => { + const { privateStoredWallet } = await setup(); + + const result = validatePrivateStoredWallet(privateStoredWallet); + expect(result).toBe(true); + }); + + it.each` + reason | wrongValue + ${'wrong private key'} | ${{ privateKey: 'wrong' }} + ${'wrong public key'} | ${{ public_key: 'wrong' }} + ${'wrong address'} | ${{ address: 'wrong' }} + ${'unsupported key type (ethsecp256k1)'} | ${{ key_type: KeyType.ethsecp256k1 }} + ${'unsupported key type (sr25519)'} | ${{ key_type: KeyType.sr25519 }} + `('returns false with $reason', async ({ wrongValue }) => { + const { privateStoredWallet } = await setup(); + + const result = validatePrivateStoredWallet({ ...privateStoredWallet, ...wrongValue }); + expect(result).toBe(false); + }); + + it('returns false with mismatched private key and public key', async () => { + const { privateStoredWallet } = await setup(); + + const mismatchedPrivateKeyAndPublicKey = validatePrivateStoredWallet({ + ...privateStoredWallet, + public_key: privateStoredWallet.privateKey, + }); + expect(mismatchedPrivateKeyAndPublicKey).toBe(false); + }); +}); From a0ff0940ccde9cf78e1933b786503c1c5eadb756 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:14:58 +0900 Subject: [PATCH 46/77] fix: import cosmocClient --- projects/shared/src/lib/utils/validation.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/shared/src/lib/utils/validation.spec.ts b/projects/shared/src/lib/utils/validation.spec.ts index 6dc8efdca..2c9af65a5 100644 --- a/projects/shared/src/lib/utils/validation.spec.ts +++ b/projects/shared/src/lib/utils/validation.spec.ts @@ -8,7 +8,7 @@ import { validatePrivateStoredWallet, WalletType, } from '../../common'; -import { cosmosclient } from '@cosmos-client/core'; +import cosmosclient from '@cosmos-client/core'; describe('validatePrivateStoredWallet', () => { const setup = async () => { From f176fe5d2720fc0652f5e3b43b452d7f5cb49433 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:53:29 +0900 Subject: [PATCH 47/77] fix: add handle error --- .../portal/src/app/models/cosmos-rest.service.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index dce0f9a64..71dc8b087 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -30,10 +30,7 @@ export class CosmosRestService { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.bank.allBalances(sdk, cosmosAccAddress)), map((res) => res.data.balances), - catchError((error) => { - console.error(error); - return of(undefined); - }), + catchError(this._handleError), ); } @@ -46,10 +43,12 @@ export class CosmosRestService { const { protoJSONToInstance, castProtoJSONOfProtoAny } = cosmosclient.codec; return (account && protoJSONToInstance(castProtoJSONOfProtoAny(account))) as InlineResponse; }), - catchError((error) => { - console.error(error); - return of(undefined); - }), + catchError(this._handleError), ); } + + private _handleError(error: any): Observable { + console.error(error); + return of(undefined); + } } From aaf22f972ce615f45a60ccb7cf72ce281e418128 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 11:54:40 +0900 Subject: [PATCH 48/77] fix: split rest from account.component --- .../accounts/account/account.component.ts | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/projects/portal/src/app/pages/accounts/account/account.component.ts b/projects/portal/src/app/pages/accounts/account/account.component.ts index fcf80f551..5f092c38e 100644 --- a/projects/portal/src/app/pages/accounts/account/account.component.ts +++ b/projects/portal/src/app/pages/accounts/account/account.component.ts @@ -1,9 +1,9 @@ -import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { Component, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; -import { combineLatest, Observable, of } from 'rxjs'; +import { Observable, of } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @Component({ @@ -19,12 +19,12 @@ export class AccountComponent implements OnInit { | unknown | undefined >; - balances$: Observable; + balances$: Observable; constructor( private route: ActivatedRoute, - private cosmosSDK: CosmosSDKService, private snackBar: MatSnackBar, + private cosmosRest: CosmosRestService, ) { this.address$ = this.route.params.pipe( map((params) => params.address), @@ -39,37 +39,23 @@ export class AccountComponent implements OnInit { } }), ); - - const combined$ = combineLatest([this.cosmosSDK.sdk$, this.address$]); - - this.account$ = combined$.pipe( - mergeMap(([sdk, address]) => { + this.account$ = this.address$.pipe( + mergeMap((address) => { if (address === undefined) { return of(undefined); } - return cosmosclient.rest.auth - .account(sdk.rest, address) - .then((res) => - cosmosclient.codec.protoJSONToInstance( - cosmosclient.codec.castProtoJSONOfProtoAny(res.data?.account), - ), - ) - .catch((error) => { - console.error(error); - return undefined; - }); + return this.cosmosRest.getAccount$(address); }), ); - - this.balances$ = combined$.pipe( - mergeMap(([sdk, address]) => { + this.balances$ = this.address$.pipe( + mergeMap((address) => { if (address === undefined) { return of([]); } - return cosmosclient.rest.bank.allBalances(sdk.rest, address).then((res) => res.data.balances || []); + return this.cosmosRest.allBalances$(address).pipe(map((balances) => balances || [])); }), ); } - ngOnInit() { } + ngOnInit() {} } From 8d44c0dd9cc7e33dbc5646145f93db5a96cff5b8 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 12:01:59 +0900 Subject: [PATCH 49/77] fix: split rest from txs.component --- .../src/app/models/cosmos-rest.service.ts | 18 +++++++++++ .../accounts/account/txs/txs.component.ts | 32 ++++++------------- 2 files changed, 28 insertions(+), 22 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index 71dc8b087..b595f2bcb 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -3,6 +3,7 @@ import { Injectable } from '@angular/core'; import cosmosclient from '@cosmos-client/core'; import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; import { + CosmosTxV1beta1GetTxsEventResponse, InlineResponse20012 as InlineResponse, InlineResponse2003Balances as InlineResponseBalances, } from '@cosmos-client/core/esm/openapi'; @@ -47,6 +48,23 @@ export class CosmosRestService { ); } + getAccountTxsEvent$(address: string): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => + cosmosclient.rest.tx.getTxsEvent( + sdk, + [`message.sender='${address}'`], + undefined, + undefined, + undefined, + true, + ), + ), + map((res) => res.data), + catchError(this._handleError), + ); + } + private _handleError(error: any): Observable { console.error(error); return of(undefined); diff --git a/projects/portal/src/app/pages/accounts/account/txs/txs.component.ts b/projects/portal/src/app/pages/accounts/account/txs/txs.component.ts index c174f75a4..b5b3662df 100644 --- a/projects/portal/src/app/pages/accounts/account/txs/txs.component.ts +++ b/projects/portal/src/app/pages/accounts/account/txs/txs.component.ts @@ -1,9 +1,8 @@ -import { CosmosSDKService } from '../../../../models/cosmos-sdk.service'; +import { CosmosRestService } from '../../../../models/cosmos-rest.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import cosmosclient from '@cosmos-client/core'; import { CosmosTxV1beta1GetTxsEventResponse } from '@cosmos-client/core/esm/openapi'; -import { combineLatest, Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @Component({ @@ -15,28 +14,17 @@ export class TxsComponent implements OnInit { address$: Observable; txsWithPagination$: Observable; - constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { + constructor(private route: ActivatedRoute, private cosmosRest: CosmosRestService) { this.address$ = this.route.params.pipe(map((params) => params.address)); - const sdk$ = this.cosmosSDK.sdk$; - this.txsWithPagination$ = combineLatest([sdk$, this.address$]).pipe( - mergeMap(([sdk, address]) => { - return cosmosclient.rest.tx - .getTxsEvent( - sdk.rest, - [`message.sender='${address}'`], - undefined, - undefined, - undefined, - true, - ) - .then((res) => res.data) - .catch((error) => { - console.error(error); - return undefined; - }); + this.txsWithPagination$ = this.address$.pipe( + mergeMap((address) => { + if (address === undefined) { + return of(undefined); + } + return this.cosmosRest.getAccountTxsEvent$(address); }), ); } - ngOnInit(): void { } + ngOnInit(): void {} } From 6ea70ec2b66156f605c5d5cc88ca6f01af66ab38 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 12:08:32 +0900 Subject: [PATCH 50/77] fix: split rest from staking.component --- .../src/app/models/cosmos-rest.service.ts | 15 ++++++- .../account/staking/staking.component.ts | 39 ++++++++----------- 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index b595f2bcb..ac4d20544 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -3,7 +3,8 @@ import { Injectable } from '@angular/core'; import cosmosclient from '@cosmos-client/core'; import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; import { - CosmosTxV1beta1GetTxsEventResponse, + CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse as DelegationTotalRewardsResponse, + CosmosTxV1beta1GetTxsEventResponse as TxsEventResponse, InlineResponse20012 as InlineResponse, InlineResponse2003Balances as InlineResponseBalances, } from '@cosmos-client/core/esm/openapi'; @@ -48,7 +49,7 @@ export class CosmosRestService { ); } - getAccountTxsEvent$(address: string): Observable { + getAccountTxsEvent$(address: string): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.tx.getTxsEvent( @@ -65,6 +66,16 @@ export class CosmosRestService { ); } + getDelegationTotalRewards$( + accAddress: cosmosclient.AccAddress, + ): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.distribution.delegationTotalRewards(sdk, accAddress)), + map((res) => res.data), + catchError(this._handleError), + ); + } + private _handleError(error: any): Observable { console.error(error); return of(undefined); diff --git a/projects/portal/src/app/pages/accounts/account/staking/staking.component.ts b/projects/portal/src/app/pages/accounts/account/staking/staking.component.ts index 4448a0336..a6d1a2ebf 100644 --- a/projects/portal/src/app/pages/accounts/account/staking/staking.component.ts +++ b/projects/portal/src/app/pages/accounts/account/staking/staking.component.ts @@ -2,12 +2,9 @@ import { Component, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; -import { - CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse, - QueryValidatorDelegationsResponseIsResponseTypeForTheQueryValidatorDelegationsRPCMethod, -} from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; -import { combineLatest, Observable, of } from 'rxjs'; +import { CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse } from '@cosmos-client/core/esm/openapi/api'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; +import { Observable, of } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @Component({ @@ -23,8 +20,8 @@ export class StakingComponent implements OnInit { constructor( private readonly route: ActivatedRoute, - private readonly cosmosSDK: CosmosSDKService, private snackBar: MatSnackBar, + private cosmosRest: CosmosRestService, ) { const accAddress$ = this.route.params.pipe( map((params) => params.address), @@ -39,32 +36,30 @@ export class StakingComponent implements OnInit { } }), ); - const valAddress$ = accAddress$.pipe( - map((accAddress) => { - if (accAddress === undefined) { - return undefined; - } - return accAddress.toValAddress(); - }), - ); - const combined$ = combineLatest([this.cosmosSDK.sdk$, accAddress$, valAddress$]); /* delegationTotalRewardsで報酬の合計値、Valaddress毎の報酬の両方を取得可能 Valaddress指定で取得するAPI delegationRewardsは現状コメントアウト */ - this.totalRewards$ = combined$.pipe( - mergeMap(([sdk, accAddress]) => { + this.totalRewards$ = accAddress$.pipe( + mergeMap((accAddress) => { if (accAddress === undefined) { return of(undefined); } - return cosmosclient.rest.distribution - .delegationTotalRewards(sdk.rest, accAddress) - .then((res) => res.data); + return this.cosmosRest.getDelegationTotalRewards$(accAddress); }), ); /* + const valAddress$ = accAddress$.pipe( + map((accAddress) => { + if (accAddress === undefined) { + return undefined; + } + return accAddress.toValAddress(); + }), + ); + const combined$ = combineLatest([this.cosmosSDK.sdk$, accAddress$, valAddress$]); this.eachRewards$ = combined$.pipe( mergeMap(([sdk, accAddress, valAddress]) => cosmosclient.rest.cosmos.distribution.delegationRewards(sdk.rest, accAddress, valAddress)), map((res) => res.data), @@ -72,5 +67,5 @@ export class StakingComponent implements OnInit { */ } - ngOnInit(): void { } + ngOnInit(): void {} } From a175ae7dcbf6a07baf3155b143aac401c310238d Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 12:22:11 +0900 Subject: [PATCH 51/77] fix: split rest from distoribution.component --- .../src/app/models/cosmos-rest.service.ts | 44 +++++++++++++++++++ .../distribution/distribution.component.ts | 24 +++++----- 2 files changed, 54 insertions(+), 14 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index ac4d20544..d59a08955 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -4,9 +4,12 @@ import cosmosclient from '@cosmos-client/core'; import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; import { CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse as DelegationTotalRewardsResponse, + CosmosDistributionV1beta1QueryValidatorSlashesResponse as ValidatorSlashesResponse, CosmosTxV1beta1GetTxsEventResponse as TxsEventResponse, InlineResponse20012 as InlineResponse, + InlineResponse20022, InlineResponse2003Balances as InlineResponseBalances, + QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod as ValidatorCommissionResponse, } from '@cosmos-client/core/esm/openapi'; import { Observable, of } from 'rxjs'; import { catchError, map, mergeMap, pluck, tap } from 'rxjs/operators'; @@ -76,6 +79,47 @@ export class CosmosRestService { ); } + getValidatorCommission$( + validatorAddress: cosmosclient.ValAddress, + ): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.distribution.validatorCommission(sdk, validatorAddress)), + map((res) => res.data), + catchError(this._handleError), + ); + } + + getValidatorOutstandingRewards$( + valAddress: cosmosclient.ValAddress, + ): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => + cosmosclient.rest.distribution.validatorOutstandingRewards(sdk, valAddress), + ), + map((res) => res.data), + catchError(this._handleError), + ); + } + + getValidatorSlashes$( + valAddress: cosmosclient.ValAddress, + startingHeight?: string, + endingHeight?: string, + ): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => + cosmosclient.rest.distribution.validatorSlashes( + sdk, + valAddress, + startingHeight, + endingHeight, + ), + ), + map((res) => res.data), + catchError(this._handleError), + ); + } + private _handleError(error: any): Observable { console.error(error); return of(undefined); diff --git a/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts b/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts index a547d8b86..f97dbefdc 100644 --- a/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts +++ b/projects/portal/src/app/pages/accounts/account/distribution/distribution.component.ts @@ -7,7 +7,7 @@ import { InlineResponse20022, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod, } from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { combineLatest, Observable, of } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -26,8 +26,8 @@ export class DistributionComponent implements OnInit { constructor( private readonly route: ActivatedRoute, - private readonly cosmosSDK: CosmosSDKService, private readonly snackBar: MatSnackBar, + private readonly cosmosRest: CosmosRestService, ) { const accAddress$ = this.route.params.pipe( map((params) => params.address), @@ -50,39 +50,35 @@ export class DistributionComponent implements OnInit { return address.toValAddress(); }), ); - const combined$ = combineLatest([this.cosmosSDK.sdk$, accAddress$, valAddress$]); + const combined$ = combineLatest([accAddress$, valAddress$]); this.commission$ = combined$.pipe( - mergeMap(([sdk, accAddress, valAddress]) => { + mergeMap(([accAddress, valAddress]) => { if (accAddress === undefined || valAddress === undefined) { return of(undefined); } - return cosmosclient.rest.distribution.validatorCommission(sdk.rest, valAddress).then((res) => res.data); + return this.cosmosRest.getValidatorCommission$(valAddress); }), ); this.rewards$ = combined$.pipe( - mergeMap(([sdk, accAddress, valAddress]) => { + mergeMap(([accAddress, valAddress]) => { if (accAddress === undefined || valAddress === undefined) { return of(undefined); } - return cosmosclient.rest.distribution - .validatorOutstandingRewards(sdk.rest, valAddress) - .then((res) => res.data); + return this.cosmosRest.getValidatorOutstandingRewards$(valAddress); }), ); this.slashes$ = combined$.pipe( - mergeMap(([sdk, accAddress, valAddress]) => { + mergeMap(([accAddress, valAddress]) => { if (accAddress === undefined || valAddress === undefined) { return of(undefined); } - return cosmosclient.rest.distribution - .validatorSlashes(sdk.rest, valAddress, '1', '2') // Todo: '2' must be fixed to latest block height and add pagination support! - .then((res) => res.data); + return this.cosmosRest.getValidatorSlashes$(valAddress, '1', '2'); }), ); } - ngOnInit(): void { } + ngOnInit(): void {} } From 527b44ab0e3b9bc126756ffdfb1095501f5eaba9 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 12:32:30 +0900 Subject: [PATCH 52/77] fix: split rest from auction.component --- .../src/app/models/ununifi-rest.service.ts | 23 +++++++++++++++++++ .../app/pages/auction/auction.component.ts | 18 +++++---------- 2 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 projects/portal/src/app/models/ununifi-rest.service.ts diff --git a/projects/portal/src/app/models/ununifi-rest.service.ts b/projects/portal/src/app/models/ununifi-rest.service.ts new file mode 100644 index 000000000..219584c4c --- /dev/null +++ b/projects/portal/src/app/models/ununifi-rest.service.ts @@ -0,0 +1,23 @@ +import { CosmosSDKService } from './cosmos-sdk.service'; +import { Injectable } from '@angular/core'; +import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; +import { Observable } from 'rxjs'; +import { map, mergeMap, pluck } from 'rxjs/operators'; +import ununifi from 'ununifi-client'; +import { InlineResponse2002Params } from 'ununifi-client/esm/openapi'; + +@Injectable({ providedIn: 'root' }) +export class UnunifiRestService { + private restSdk$: Observable; + + constructor(private cosmosSDK: CosmosSDKService) { + this.restSdk$ = this.cosmosSDK.sdk$.pipe(pluck('rest')); + } + + getAuctionParams$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => ununifi.rest.auction.params(sdk)), + map((res) => res.data.params!), + ); + } +} diff --git a/projects/portal/src/app/pages/auction/auction.component.ts b/projects/portal/src/app/pages/auction/auction.component.ts index 598b5bb62..336166c3b 100644 --- a/projects/portal/src/app/pages/auction/auction.component.ts +++ b/projects/portal/src/app/pages/auction/auction.component.ts @@ -1,8 +1,7 @@ -import { CosmosSDKService } from '../../models/cosmos-sdk.service'; +import { UnunifiRestService } from '../../models/ununifi-rest.service'; import { Component, OnInit } from '@angular/core'; -import { combineLatest, Observable, timer } from 'rxjs'; -import { map, mergeMap } from 'rxjs/operators'; -import ununifi from 'ununifi-client'; +import { Observable, timer } from 'rxjs'; +import { mergeMap } from 'rxjs/operators'; import { InlineResponse2002Params } from 'ununifi-client/esm/openapi'; @Component({ @@ -12,14 +11,9 @@ import { InlineResponse2002Params } from 'ununifi-client/esm/openapi'; }) export class AuctionComponent implements OnInit { params$: Observable; - constructor(private cosmosSDK: CosmosSDKService) { - const timer$ = timer(0, 60 * 1000); - - this.params$ = combineLatest([this.cosmosSDK.sdk$, timer$]).pipe( - mergeMap(([sdk, _]) => ununifi.rest.auction.params(sdk.rest)), - map((res) => res.data.params!), - ); + constructor(private ununifiRest: UnunifiRestService) { + this.params$ = timer(0, 60 * 1000).pipe(mergeMap(() => this.ununifiRest.getAuctionParams$())); } - ngOnInit(): void { } + ngOnInit(): void {} } From 0840ec9ad391f0962c01d75c56ce08d891129cbd Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 14:39:33 +0900 Subject: [PATCH 53/77] fix: split rest from auctions.component --- .../src/app/models/ununifi-rest.service.ts | 14 +++- .../auction/auctions/auctions.component.ts | 64 ++++++++----------- 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/projects/portal/src/app/models/ununifi-rest.service.ts b/projects/portal/src/app/models/ununifi-rest.service.ts index 219584c4c..c2a19d943 100644 --- a/projects/portal/src/app/models/ununifi-rest.service.ts +++ b/projects/portal/src/app/models/ununifi-rest.service.ts @@ -4,7 +4,7 @@ import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; import { Observable } from 'rxjs'; import { map, mergeMap, pluck } from 'rxjs/operators'; import ununifi from 'ununifi-client'; -import { InlineResponse2002Params } from 'ununifi-client/esm/openapi'; +import { InlineResponse200, InlineResponse2002Params } from 'ununifi-client/esm/openapi'; @Injectable({ providedIn: 'root' }) export class UnunifiRestService { @@ -20,4 +20,16 @@ export class UnunifiRestService { map((res) => res.data.params!), ); } + + getAllAuctions$( + paginationOffset?: bigint | undefined, + paginationLimit?: bigint | undefined, + ): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => + ununifi.rest.auction.allAuctions(sdk, undefined, paginationOffset, paginationLimit, true), + ), + map((res) => res.data), + ); + } } diff --git a/projects/portal/src/app/pages/auction/auctions/auctions.component.ts b/projects/portal/src/app/pages/auction/auctions/auctions.component.ts index 79ccbe6bd..e7b0c5cb5 100644 --- a/projects/portal/src/app/pages/auction/auctions/auctions.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auctions.component.ts @@ -1,8 +1,8 @@ -import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; +import { UnunifiRestService } from '../../../models/ununifi-rest.service'; import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; import cosmosclient from '@cosmos-client/core'; -import { BehaviorSubject, combineLatest, Observable, of, timer } from 'rxjs'; +import { BehaviorSubject, combineLatest, Observable, timer } from 'rxjs'; import { filter, map, mergeMap, switchMap } from 'rxjs/operators'; import ununifi from 'ununifi-client'; @@ -21,24 +21,20 @@ export class AuctionsComponent implements OnInit { auctionsPageOffset$: Observable; pollingInterval = 30; - auctions$?: Observable<(ununifi.proto.ununifi.auction.CollateralAuction | undefined)[] | undefined>; + auctions$?: Observable< + (ununifi.proto.ununifi.auction.CollateralAuction | undefined)[] | undefined + >; - constructor(private cosmosSDK: CosmosSDKService) { + constructor(private ununifiRest: UnunifiRestService) { const timer$ = timer(0, this.pollingInterval * 1000); - const sdk$ = timer$.pipe(mergeMap((_) => this.cosmosSDK.sdk$)); - this.auctionsTotalCount$ = combineLatest([sdk$, this.pageNumber$, this.pageSize$]).pipe( - switchMap(([sdk, _pageNumber, _pageSize]) => { - return ununifi.rest.auction - .allAuctions(sdk.rest, undefined, undefined, undefined, true) - .then((res) => - res.data.pagination?.total ? BigInt(res.data.pagination?.total) : BigInt(0), - ) - .catch((error) => { - console.error(error); - return BigInt(0); - }); - }), + this.auctionsTotalCount$ = timer$.pipe( + mergeMap(() => + this.ununifiRest.getAllAuctions$().pipe( + map((res) => res?.pagination?.total), + map((total) => (total ? BigInt(total) : BigInt(0))), + ), + ), ); this.auctionsTotalCount$.subscribe((auctionsTotalCount) => { @@ -57,15 +53,12 @@ export class AuctionsComponent implements OnInit { ); this.auctions$ = combineLatest([ - sdk$, this.pageSize$.asObservable(), this.auctionsPageOffset$, this.auctionsTotalCount$, ]).pipe( - filter( - ([_sdk, _pageSize, _pageOffset, auctionTotalCount]) => auctionTotalCount !== BigInt(0), - ), - switchMap(([sdk, pageSize, pageOffset, _auctionTotalCount]) => { + filter(([_pageSize, _pageOffset, auctionTotalCount]) => auctionTotalCount !== BigInt(0)), + switchMap(([pageSize, pageOffset]) => { const modifiedPageOffset = pageOffset < 0 ? BigInt(0) : pageOffset; const modifiedPageSize = pageOffset < 0 ? pageOffset + BigInt(pageSize) : BigInt(pageSize); @@ -73,15 +66,13 @@ export class AuctionsComponent implements OnInit { return []; } - return ununifi.rest.auction - .allAuctions(sdk.rest, undefined, modifiedPageOffset, modifiedPageSize, true) - .then((res) => { - return res.data.auctions; - }) - .catch((error) => { - console.error(error); - return []; - }); + return timer$.pipe( + mergeMap(() => + this.ununifiRest + .getAllAuctions$(modifiedPageOffset, modifiedPageSize) + .pipe(map((res) => res.auctions)), + ), + ); }), map((latestAuctions) => { const unpackAuction = latestAuctions?.map((auction) => { @@ -93,10 +84,11 @@ export class AuctionsComponent implements OnInit { seconds: Date.parse(anyAuction.base_auction.end_time), nanos: 0, }); - anyAuction.base_auction.max_end_time = ununifi.proto.google.protobuf.Timestamp.fromObject({ - seconds: Date.parse(anyAuction.base_auction.max_end_time), - nanos: 0, - }); + anyAuction.base_auction.max_end_time = + ununifi.proto.google.protobuf.Timestamp.fromObject({ + seconds: Date.parse(anyAuction.base_auction.max_end_time), + nanos: 0, + }); return anyAuction; }; const unpackValue = cosmosclient.codec.protoJSONToInstance( @@ -113,7 +105,7 @@ export class AuctionsComponent implements OnInit { ); } - ngOnInit(): void { } + ngOnInit(): void {} appPaginationChanged(pageEvent: PageEvent): void { this.pageSize$.next(pageEvent.pageSize); From eeffefc94e4f63ab4a789bb761a3b0bc927178a1 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 14:53:58 +0900 Subject: [PATCH 54/77] fix: split rest from auction.component --- .../src/app/models/ununifi-rest.service.ts | 13 +++++++++- .../auctions/auction/auction.component.ts | 25 ++++++++++--------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/projects/portal/src/app/models/ununifi-rest.service.ts b/projects/portal/src/app/models/ununifi-rest.service.ts index c2a19d943..1b4802cc3 100644 --- a/projects/portal/src/app/models/ununifi-rest.service.ts +++ b/projects/portal/src/app/models/ununifi-rest.service.ts @@ -4,7 +4,11 @@ import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; import { Observable } from 'rxjs'; import { map, mergeMap, pluck } from 'rxjs/operators'; import ununifi from 'ununifi-client'; -import { InlineResponse200, InlineResponse2002Params } from 'ununifi-client/esm/openapi'; +import { + InlineResponse200, + InlineResponse2002Params, + InlineResponse200Auctions, +} from 'ununifi-client/esm/openapi'; @Injectable({ providedIn: 'root' }) export class UnunifiRestService { @@ -32,4 +36,11 @@ export class UnunifiRestService { map((res) => res.data), ); } + + getAuction$(id: string): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => ununifi.rest.auction.auction(sdk, id)), + map((res) => res.data.auction), + ); + } } diff --git a/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts b/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts index 952edb77d..49daaa993 100644 --- a/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auction/auction.component.ts @@ -1,8 +1,8 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; -import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; -import { combineLatest, Observable } from 'rxjs'; +import { UnunifiRestService } from 'projects/portal/src/app/models/ununifi-rest.service'; +import { Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; import ununifi from 'ununifi-client'; @@ -17,12 +17,11 @@ export class AuctionComponent implements OnInit { endTime$: Observable; maxEndTime$: Observable; - constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { + constructor(private route: ActivatedRoute, private ununifiRest: UnunifiRestService) { this.auctionID$ = this.route.params.pipe(map((params) => params.auction_id)); - this.auction$ = combineLatest([this.cosmosSDK.sdk$, this.auctionID$]).pipe( - mergeMap(([sdk, id]) => - ununifi.rest.auction.auction(sdk.rest, id).then((res) => res.data.auction), - ), + + this.auction$ = this.auctionID$.pipe( + mergeMap((id) => this.ununifiRest.getAuction$(id)), map((auction) => { const anyAuction = auction as { base_auction: { end_time: string; max_end_time: string }; @@ -32,10 +31,12 @@ export class AuctionComponent implements OnInit { seconds: Date.parse(anyAuction.base_auction.end_time), nanos: 0, }); - anyAuction.base_auction.max_end_time = ununifi.proto.google.protobuf.Timestamp.fromObject({ - seconds: Date.parse(anyAuction.base_auction.max_end_time), - nanos: 0, - }); + anyAuction.base_auction.max_end_time = ununifi.proto.google.protobuf.Timestamp.fromObject( + { + seconds: Date.parse(anyAuction.base_auction.max_end_time), + nanos: 0, + }, + ); return anyAuction; }; const unpackAuction = cosmosclient.codec.protoJSONToInstance( @@ -71,5 +72,5 @@ export class AuctionComponent implements OnInit { ); } - ngOnInit(): void { } + ngOnInit(): void {} } From 91abcd5da69b88dc86420d729afd47d4dde48bcd Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 14:58:18 +0900 Subject: [PATCH 55/77] fix: split rest from place-bid.component --- .../auction/place-bid/place-bid.component.ts | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts b/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts index 61e56c39a..da49bc3d3 100644 --- a/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts @@ -3,11 +3,11 @@ import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; import { AuctionApplicationService } from 'projects/portal/src/app/models/auctions/auction.application.service'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; -import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.service'; +import { UnunifiRestService } from 'projects/portal/src/app/models/ununifi-rest.service'; import { PlaceBidOnSubmitEvent } from 'projects/portal/src/app/views/auction/auctions/auction/place-bid/place-bid.component'; -import { combineLatest, Observable } from 'rxjs'; +import { Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; import ununifi from 'ununifi-client'; @@ -27,16 +27,14 @@ export class PlaceBidComponent implements OnInit { constructor( private route: ActivatedRoute, private readonly keyStore: KeyStoreService, - private cosmosSDK: CosmosSDKService, private readonly auctionApplicationService: AuctionApplicationService, private readonly configS: ConfigService, + private ununifiRest: UnunifiRestService, ) { this.key$ = this.keyStore.currentKey$.asObservable(); this.auctionID$ = this.route.params.pipe(map((params) => params.auction_id)); - this.auction$ = combineLatest([this.cosmosSDK.sdk$, this.auctionID$]).pipe( - mergeMap(([sdk, id]) => - ununifi.rest.auction.auction(sdk.rest, id).then((res) => res.data.auction), - ), + this.auction$ = this.auctionID$.pipe( + mergeMap(([id]) => this.ununifiRest.getAuction$(id)), map((auction) => { const anyAuction = auction as { base_auction: { end_time: string; max_end_time: string }; @@ -46,10 +44,12 @@ export class PlaceBidComponent implements OnInit { seconds: Date.parse(anyAuction.base_auction.end_time), nanos: 0, }); - anyAuction.base_auction.max_end_time = ununifi.proto.google.protobuf.Timestamp.fromObject({ - seconds: Date.parse(anyAuction.base_auction.max_end_time), - nanos: 0, - }); + anyAuction.base_auction.max_end_time = ununifi.proto.google.protobuf.Timestamp.fromObject( + { + seconds: Date.parse(anyAuction.base_auction.max_end_time), + nanos: 0, + }, + ); return anyAuction; }; const unpackAuction = cosmosclient.codec.protoJSONToInstance( @@ -86,7 +86,7 @@ export class PlaceBidComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} onSubmit($event: PlaceBidOnSubmitEvent) { this.auctionApplicationService.placeBid( From fffa13d1795d8819e8a3849cd7fca04984710dc0 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:03:26 +0900 Subject: [PATCH 56/77] fix: split rest from send.component --- .../app/pages/cosmos/bank/send/send.component.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts b/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts index 47548663d..25150a345 100644 --- a/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts +++ b/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts @@ -1,14 +1,14 @@ -import { CosmosSDKService } from '../../../../models/cosmos-sdk.service'; import { BankApplicationService } from '../../../../models/cosmos/bank.application.service'; import { SendOnSubmitEvent } from '../../../../views/cosmos/bank/send/send.component'; import { Component, OnInit } from '@angular/core'; import { MatSnackBar } from '@angular/material/snack-bar'; import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; import { WalletService } from 'projects/portal/src/app/models/wallets/wallet.service'; -import { combineLatest, Observable } from 'rxjs'; -import { map, mergeMap, filter } from 'rxjs/operators'; +import { Observable } from 'rxjs'; +import { filter, map, mergeMap } from 'rxjs/operators'; @Component({ selector: 'app-send', @@ -22,11 +22,11 @@ export class SendComponent implements OnInit { minimumGasPrices$: Observable; constructor( - private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, private readonly bankApplication: BankApplicationService, private readonly snackBar: MatSnackBar, private readonly configS: ConfigService, + private readonly cosmosRest: CosmosRestService, ) { this.currentStoredWallet$ = this.walletService.currentStoredWallet$; @@ -35,10 +35,7 @@ export class SendComponent implements OnInit { map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), - map((result) => result.data.balances), - ); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); this.amount$ = this.coins$.pipe( map((amount) => @@ -52,7 +49,7 @@ export class SendComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} async onSubmit($event: SendOnSubmitEvent) { if ($event.amount.length === 0) { From d0164a6c319ad41d58d4235a52baf567067a19f9 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:07:01 +0900 Subject: [PATCH 57/77] fix: split rest from validators.component --- .../portal/src/app/models/cosmos-rest.service.ts | 8 ++++++++ .../staking/validators/validators.component.ts | 15 +++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index d59a08955..c0927c606 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -10,6 +10,7 @@ import { InlineResponse20022, InlineResponse2003Balances as InlineResponseBalances, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod as ValidatorCommissionResponse, + QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod as ValidatorsResponse, } from '@cosmos-client/core/esm/openapi'; import { Observable, of } from 'rxjs'; import { catchError, map, mergeMap, pluck, tap } from 'rxjs/operators'; @@ -79,6 +80,13 @@ export class CosmosRestService { ); } + getValidators$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk)), + map((res) => res.data), + ); + } + getValidatorCommission$( validatorAddress: cosmosclient.ValAddress, ): Observable { diff --git a/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts b/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts index efaec5d27..b95c959ab 100644 --- a/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts +++ b/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts @@ -1,9 +1,7 @@ -import { CosmosSDKService } from '../../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; -import cosmosclient from '@cosmos-client/core'; import { QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod } from '@cosmos-client/core/esm/openapi'; -import { Observable, from } from 'rxjs'; -import { map, mergeMap } from 'rxjs/operators'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; +import { Observable } from 'rxjs'; @Component({ selector: 'app-validators', @@ -13,12 +11,9 @@ import { map, mergeMap } from 'rxjs/operators'; export class ValidatorsComponent implements OnInit { validators$: Observable; - constructor(private cosmosSDK: CosmosSDKService) { - this.validators$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), - map((result) => result.data), - ); + constructor(private cosmosRest: CosmosRestService) { + this.validators$ = this.cosmosRest.getValidators$(); } - ngOnInit() { } + ngOnInit() {} } From 788d9a86bea102d712be05f6610032153dc593f0 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:11:37 +0900 Subject: [PATCH 58/77] fix: split rest from validator.component --- .../src/app/models/cosmos-rest.service.ts | 9 +++++++ .../validator/validator.component.ts | 24 ++++++------------- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index c0927c606..2a61dc7c7 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -9,6 +9,7 @@ import { InlineResponse20012 as InlineResponse, InlineResponse20022, InlineResponse2003Balances as InlineResponseBalances, + InlineResponse20041Validators as Validators, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod as ValidatorCommissionResponse, QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod as ValidatorsResponse, } from '@cosmos-client/core/esm/openapi'; @@ -87,6 +88,14 @@ export class CosmosRestService { ); } + getValidator$(valAddress: cosmosclient.ValAddress): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.staking.validator(sdk, valAddress)), + map((res) => res.data.validator), + catchError(this._handleError), + ); + } + getValidatorCommission$( validatorAddress: cosmosclient.ValAddress, ): Observable { diff --git a/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts b/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts index 32018f1e4..a990a6c66 100644 --- a/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts +++ b/projects/portal/src/app/pages/cosmos/staking/validators/validator/validator.component.ts @@ -1,10 +1,10 @@ -import { CosmosSDKService } from '../../../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; -import { Observable, of, combineLatest } from 'rxjs'; -import { map, mergeMap, catchError } from 'rxjs/operators'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; +import { Observable } from 'rxjs'; +import { map, mergeMap } from 'rxjs/operators'; @Component({ selector: 'app-validator', @@ -14,23 +14,13 @@ import { map, mergeMap, catchError } from 'rxjs/operators'; export class ValidatorComponent implements OnInit { validator$: Observable; - constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { - const validatorAddress$ = this.route.params.pipe( + constructor(private route: ActivatedRoute, private cosmosRest: CosmosRestService) { + this.validator$ = this.route.params.pipe( map((params) => params.address), map((addr) => cosmosclient.ValAddress.fromString(addr)), - ); - console.log(validatorAddress$); - - const combined$ = combineLatest([this.cosmosSDK.sdk$, validatorAddress$]); - this.validator$ = combined$.pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.staking.validator(sdk.rest, address)), - map((result) => result.data.validator!), - catchError((error) => { - console.error(error); - return of(undefined); - }), + mergeMap((address) => this.cosmosRest.getValidator$(address)), ); } - ngOnInit() { } + ngOnInit() {} } From 812c735e8289745aa51609d25b6d3e3039bf121f Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:22:41 +0900 Subject: [PATCH 59/77] fix: split rest from delegator.component --- .../src/app/models/cosmos-rest.service.ts | 16 ++++++++++++++ .../delegator/delegator.component.ts | 21 +++++++------------ 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index 2a61dc7c7..a88c7471a 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -8,7 +8,9 @@ import { CosmosTxV1beta1GetTxsEventResponse as TxsEventResponse, InlineResponse20012 as InlineResponse, InlineResponse20022, + InlineResponse20038, InlineResponse2003Balances as InlineResponseBalances, + InlineResponse20041, InlineResponse20041Validators as Validators, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod as ValidatorCommissionResponse, QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod as ValidatorsResponse, @@ -81,6 +83,20 @@ export class CosmosRestService { ); } + getDelegatorDelegations$(address: cosmosclient.AccAddress): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.staking.delegatorDelegations(sdk, address)), + map((res) => res.data), + ); + } + + getDelegatorValidators$(address: cosmosclient.AccAddress): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.staking.delegatorValidators(sdk, address)), + map((res) => res.data), + ); + } + getValidators$(): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk)), diff --git a/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts b/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts index 2bbea8378..0e56b1ed7 100644 --- a/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts +++ b/projects/portal/src/app/pages/cosmos/staking/delegators/delegator/delegator.component.ts @@ -1,9 +1,9 @@ -import { CosmosSDKService } from '../../../../../models/cosmos-sdk.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038, InlineResponse20041 } from '@cosmos-client/core/esm/openapi'; -import { combineLatest, Observable } from 'rxjs'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; +import { Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @Component({ @@ -17,25 +17,20 @@ export class DelegatorComponent implements OnInit { constructor( private readonly route: ActivatedRoute, - private readonly cosmosSDK: CosmosSDKService, + private readonly cosmosRest: CosmosRestService, ) { const address$ = this.route.params.pipe( map((params) => params.address), map((addr) => cosmosclient.AccAddress.fromString(addr)), ); - const combined$ = combineLatest([this.cosmosSDK.sdk$, address$]); - - this.delegations$ = combined$.pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorDelegations(sdk.rest, address)), - map((res) => res.data), + this.delegations$ = address$.pipe( + mergeMap((address) => this.cosmosRest.getDelegatorDelegations$(address)), ); - - this.validators$ = combined$.pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorValidators(sdk.rest, address)), - map((res) => res.data), + this.validators$ = address$.pipe( + mergeMap((address) => this.cosmosRest.getDelegatorValidators$(address)), ); } - ngOnInit(): void { } + ngOnInit(): void {} } From d77889597ac4984bdecef4a4f2b7127e680b4cb1 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:37:10 +0900 Subject: [PATCH 60/77] fix: split rest from validators.component --- .../src/app/models/cosmos-rest.service.ts | 13 ++++++++ .../validators/validators.component.ts | 33 +++++++------------ 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index a88c7471a..f40d0eeda 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -12,6 +12,7 @@ import { InlineResponse2003Balances as InlineResponseBalances, InlineResponse20041, InlineResponse20041Validators as Validators, + InlineResponse20047, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod as ValidatorCommissionResponse, QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod as ValidatorsResponse, } from '@cosmos-client/core/esm/openapi'; @@ -97,6 +98,18 @@ export class CosmosRestService { ); } + getUnbondingDelegation$( + validatorAddr: cosmosclient.ValAddress, + delegatorAddr: cosmosclient.AccAddress, + ): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => + cosmosclient.rest.staking.unbondingDelegation(sdk, validatorAddr, delegatorAddr), + ), + map((res) => res.data), + ); + } + getValidators$(): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk)), diff --git a/projects/portal/src/app/pages/delegate/validators/validators.component.ts b/projects/portal/src/app/pages/delegate/validators/validators.component.ts index 54bc5e1f1..2a2fd5842 100644 --- a/projects/portal/src/app/pages/delegate/validators/validators.component.ts +++ b/projects/portal/src/app/pages/delegate/validators/validators.component.ts @@ -1,4 +1,4 @@ -import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { StakingApplicationService } from '../../../models/cosmos/staking.application.service'; import { StoredWallet } from '../../../models/wallets/wallet.model'; import { WalletService } from '../../../models/wallets/wallet.service'; @@ -13,8 +13,8 @@ import { InlineResponse20041Validators, InlineResponse20047, } from '@cosmos-client/core/esm/openapi'; -import { of, Observable, BehaviorSubject, combineLatest, zip } from 'rxjs'; -import { filter, map, mergeMap, concatMap, withLatestFrom } from 'rxjs/operators'; +import { BehaviorSubject, combineLatest, Observable } from 'rxjs'; +import { concatMap, filter, map, mergeMap, withLatestFrom } from 'rxjs/operators'; @Component({ selector: 'app-validators', @@ -36,14 +36,11 @@ export class ValidatorsComponent implements OnInit { activeEnabled: BehaviorSubject = new BehaviorSubject(true); constructor( - private cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, private readonly stakingAppService: StakingApplicationService, + private cosmosRest: CosmosRestService, ) { - this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), - map((result) => result.data.validators), - ); + this.validatorsList$ = this.cosmosRest.getValidators$().pipe(map((res) => res.validators)); this.allValidatorsTokens$ = this.validatorsList$.pipe( map((validators) => @@ -103,10 +100,9 @@ export class ValidatorsComponent implements OnInit { map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - const combined$ = combineLatest([this.cosmosSDK.sdk$, address$]); - this.delegations$ = combined$.pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorDelegations(sdk.rest, address)), - map((result) => result.data.delegation_responses), + this.delegations$ = address$.pipe( + mergeMap((address) => this.cosmosRest.getDelegatorDelegations$(address)), + map((result) => result.delegation_responses), ); this.delegatedValidators$ = combineLatest([this.validatorsList$, this.delegations$]).pipe( @@ -130,8 +126,8 @@ export class ValidatorsComponent implements OnInit { ); this.unbondingDelegations$ = this.delegatedValidators$.pipe( - withLatestFrom(this.cosmosSDK.sdk$, address$), - concatMap(([validators, sdk, accAddress]) => { + withLatestFrom(address$), + concatMap(([validators, accAddress]) => { const valAddressList = validators?.map((validator) => { if (!validator?.operator_address) return undefined; try { @@ -146,12 +142,7 @@ export class ValidatorsComponent implements OnInit { const unbondingDelegationList = Promise.all( valAddressList.map((valAddress) => { if (!valAddress) return undefined; - return cosmosclient.rest.staking - .unbondingDelegation(sdk.rest, valAddress, accAddress) - .then((res) => res && res.data) - .catch((err) => { - return undefined; - }); + return this.cosmosRest.getUnbondingDelegation$(valAddress, accAddress).toPromise(); }), ); return unbondingDelegationList; @@ -164,7 +155,7 @@ export class ValidatorsComponent implements OnInit { ); } - ngOnInit() { } + ngOnInit() {} onToggleChange(value: boolean) { this.activeEnabled.next(value); From e7e8d89e21f59f3ec6b0f30cd8744e948e6a038a Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:39:30 +0900 Subject: [PATCH 61/77] fix: split rest from validator.component --- .../validator/validator.component.ts | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts b/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts index 354470fae..fde0efb25 100644 --- a/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts +++ b/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts @@ -1,14 +1,11 @@ -import { CosmosSDKService } from '../../../../models'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; -import { - InlineResponse20014Validators, - QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod, -} from '@cosmos-client/core/esm/openapi'; +import { QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod } from '@cosmos-client/core/esm/openapi'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { validatorType } from 'projects/portal/src/app/views/delegate/validators/validators.component'; -import { Observable, of, combineLatest } from 'rxjs'; -import { map, mergeMap, catchError, withLatestFrom } from 'rxjs/operators'; +import { combineLatest, Observable } from 'rxjs'; +import { map, withLatestFrom } from 'rxjs/operators'; @Component({ selector: 'app-validator', @@ -23,7 +20,7 @@ export class ValidatorComponent implements OnInit { accAddress$: Observable; - constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { + constructor(private route: ActivatedRoute, private cosmosRest: CosmosRestService) { const validatorAddress$ = this.route.params.pipe( map((params) => params.address), map((addr) => cosmosclient.ValAddress.fromString(addr)), @@ -32,10 +29,7 @@ export class ValidatorComponent implements OnInit { map((validatorAddress) => validatorAddress.toAccAddress()), ); - this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), - map((result) => result.data), - ); + this.validatorsList$ = this.cosmosRest.getValidators$(); this.allValidatorsTokens$ = this.validatorsList$.pipe( map((validators) => @@ -80,5 +74,5 @@ export class ValidatorComponent implements OnInit { ); } - ngOnInit() { } + ngOnInit() {} } From 937ffe024c8452717bafb51cd4443ad5218b8219 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:46:22 +0900 Subject: [PATCH 62/77] fix: split rest from vote-form-dialog.component --- .../src/app/models/cosmos-rest.service.ts | 9 +++++++ .../vote-form-dialog.component.ts | 25 ++++++------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index f40d0eeda..25032fac4 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -8,6 +8,7 @@ import { CosmosTxV1beta1GetTxsEventResponse as TxsEventResponse, InlineResponse20012 as InlineResponse, InlineResponse20022, + InlineResponse20027Proposals, InlineResponse20038, InlineResponse2003Balances as InlineResponseBalances, InlineResponse20041, @@ -166,6 +167,14 @@ export class CosmosRestService { ); } + getProposal$(proposalId: string): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.gov.proposal(sdk, proposalId)), + map((res) => res.data.proposal), + catchError(this._handleError), + ); + } + private _handleError(error: any): Observable { console.error(error); return of(undefined); diff --git a/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts index 0d19c7f6c..ab853dac7 100644 --- a/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts @@ -2,14 +2,14 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027Proposals } from '@cosmos-client/core/esm/openapi'; -import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { GovApplicationService } from 'projects/portal/src/app/models/cosmos/gov.application.service'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; import { WalletService } from 'projects/portal/src/app/models/wallets/wallet.service'; import { VoteOnSubmitEvent } from 'projects/portal/src/app/views/dialogs/vote/vote/vote-form-dialog.component'; -import { combineLatest, Observable, of } from 'rxjs'; -import { catchError, filter, map, mergeMap } from 'rxjs/operators'; +import { Observable } from 'rxjs'; +import { filter, map, mergeMap } from 'rxjs/operators'; @Component({ selector: 'app-vote-form-dialog', @@ -28,30 +28,21 @@ export class VoteFormDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public readonly data: number, public matDialogRef: MatDialogRef, - private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, private readonly configS: ConfigService, private readonly govAppService: GovApplicationService, + private readonly cosmosRest: CosmosRestService, ) { this.proposalID = data; - this.proposal$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.gov.proposal(sdk.rest, String(this.proposalID))), - map((result) => result.data.proposal!), - catchError((error) => { - console.error(error); - return of(undefined); - }), - ); + this.proposal$ = this.cosmosRest.getProposal$(String(this.proposalID)); this.currentStoredWallet$ = this.walletService.currentStoredWallet$; const address$ = this.currentStoredWallet$.pipe( filter((wallet): wallet is StoredWallet => wallet !== undefined && wallet !== null), map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), - map((result) => result.data.balances), - ); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); + this.uguuBalance$ = this.coins$.pipe( map((coins) => { const balance = coins?.find((coin) => coin.denom == 'uguu'); @@ -62,7 +53,7 @@ export class VoteFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} async onSubmitYes($event: VoteOnSubmitEvent) { if (!this.proposalID) { From 0c2d2c71a405378491b1ac329ec38010e0fceaa1 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:49:41 +0900 Subject: [PATCH 63/77] fix: split rest from deposit-form-dialog.component --- .../deposit-form-dialog.component.ts | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts index 7cd17d14b..1c18eda15 100644 --- a/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts @@ -2,14 +2,14 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027Proposals } from '@cosmos-client/core/esm/openapi'; -import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { GovApplicationService } from 'projects/portal/src/app/models/cosmos/gov.application.service'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; import { WalletService } from 'projects/portal/src/app/models/wallets/wallet.service'; import { DepositOnSubmitEvent } from 'projects/portal/src/app/views/dialogs/vote/deposit/deposit-form-dialog.component'; -import { combineLatest, Observable, of } from 'rxjs'; -import { catchError, filter, map, mergeMap } from 'rxjs/operators'; +import { Observable } from 'rxjs'; +import { filter, map, mergeMap } from 'rxjs/operators'; @Component({ selector: 'app-deposit-form-dialog', @@ -28,30 +28,19 @@ export class DepositFormDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public readonly data: number, public matDialogRef: MatDialogRef, - private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, private readonly configS: ConfigService, private readonly govAppService: GovApplicationService, + private readonly cosmosRest: CosmosRestService, ) { this.proposalID = data; - this.proposal$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.gov.proposal(sdk.rest, String(this.proposalID))), - map((result) => result.data.proposal!), - catchError((error) => { - console.error(error); - return of(undefined); - }), - ); + this.proposal$ = this.cosmosRest.getProposal$(String(this.proposalID)); this.currentStoredWallet$ = this.walletService.currentStoredWallet$; const address$ = this.currentStoredWallet$.pipe( filter((wallet): wallet is StoredWallet => wallet !== undefined && wallet !== null), map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - - this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), - map((result) => result.data.balances), - ); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); this.uguuBalance$ = this.coins$.pipe( map((coins) => { const balance = coins?.find((coin) => coin.denom == 'uguu'); @@ -62,7 +51,7 @@ export class DepositFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} async onSubmit($event: DepositOnSubmitEvent) { if (!this.proposalID) { From a1a5bc4ac19d12410182e9679ef323e2e05cfcb7 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:07:27 +0900 Subject: [PATCH 64/77] fix: split rest from dialogs --- .../delegate-form-dialog.component.ts | 26 +++++--------- .../delegate-menu-dialog.component.ts | 29 +++++++-------- .../redelegate-form-dialog.component.ts | 24 +++++-------- .../undelegate-form-dialog.component.ts | 35 +++++++------------ ...-delegator-reward-form-dialog.component.ts | 4 +-- ...idator-commission-form-dialog.component.ts | 4 +-- 6 files changed, 43 insertions(+), 79 deletions(-) diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts index de0aeebd1..c65973820 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts @@ -2,18 +2,15 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { MatSnackBar } from '@angular/material/snack-bar'; import cosmosclient from '@cosmos-client/core'; -import { - InlineResponse20014Validators, - InlineResponse20041Validators, -} from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { StakingApplicationService } from 'projects/portal/src/app/models/cosmos/staking.application.service'; -import { StoredWallet, WalletType } from 'projects/portal/src/app/models/wallets/wallet.model'; +import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; import { WalletService } from 'projects/portal/src/app/models/wallets/wallet.service'; import { DelegateOnSubmitEvent } from 'projects/portal/src/app/views/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component'; import { InactiveValidatorConfirmDialogComponent } from 'projects/portal/src/app/views/dialogs/delegate/invalid-validator-confirm-dialog/inactive-validator-confirm-dialog.component'; -import { combineLatest, Observable } from 'rxjs'; +import { Observable } from 'rxjs'; import { filter, map, mergeMap } from 'rxjs/operators'; @Component({ @@ -33,28 +30,21 @@ export class DelegateFormDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public readonly data: InlineResponse20041Validators, public matDialogRef: MatDialogRef, - private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, private readonly configS: ConfigService, private readonly stakingAppService: StakingApplicationService, private readonly snackBar: MatSnackBar, private readonly dialog: MatDialog, + private readonly cosmosRest: CosmosRestService, ) { this.validator = data; - this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), - map((result) => result.data.validators), - ); + this.validatorsList$ = this.cosmosRest.getValidators$().pipe(map((res) => res.validators)); this.currentStoredWallet$ = this.walletService.currentStoredWallet$; const address$ = this.currentStoredWallet$.pipe( filter((wallet): wallet is StoredWallet => wallet !== undefined && wallet !== null), map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - - this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), - map((result) => result.data.balances), - ); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); this.uguuBalance$ = this.coins$.pipe( map((coins) => { const balance = coins?.find((coin) => coin.denom == 'uguu'); @@ -65,7 +55,7 @@ export class DelegateFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} async onSubmit($event: DelegateOnSubmitEvent) { const validatorStatus = $event.validatorList.find( diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts index 1dc65f20b..40ca134fd 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-menu-dialog/delegate-menu-dialog.component.ts @@ -4,13 +4,13 @@ import { MatSnackBar } from '@angular/material/snack-bar'; import { Router } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; import { - InlineResponse20038, - InlineResponse20041Validators, CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse, + InlineResponse20038, InlineResponse20038Delegation, + InlineResponse20041Validators, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod, } from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { DistributionApplicationService } from 'projects/portal/src/app/models/cosmos/distribution.application.service'; import { StakingApplicationService } from 'projects/portal/src/app/models/cosmos/staking.application.service'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -47,8 +47,8 @@ export class DelegateMenuDialogComponent implements OnInit { private readonly stakingAppService: StakingApplicationService, private readonly distributionAppService: DistributionApplicationService, private readonly walletService: WalletService, - private readonly cosmosSDK: CosmosSDKService, private readonly snackBar: MatSnackBar, + private readonly cosmosRest: CosmosRestService, ) { this.selectedValidator = data; this.currentStoredWallet$ = this.walletService.currentStoredWallet$; @@ -56,9 +56,8 @@ export class DelegateMenuDialogComponent implements OnInit { filter((wallet): wallet is StoredWallet => wallet !== undefined && wallet !== null), map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - this.delegations$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorDelegations(sdk.rest, address)), - map((res) => res.data), + this.delegations$ = address$.pipe( + mergeMap((address) => this.cosmosRest.getDelegatorDelegations$(address)), ); this.delegateAmount$ = this.delegations$.pipe( map( @@ -109,23 +108,21 @@ export class DelegateMenuDialogComponent implements OnInit { return address.toValAddress(); }), ); - const combined$ = combineLatest([this.cosmosSDK.sdk$, accAddress$, valAddress$]); - this.totalRewards$ = combined$.pipe( - mergeMap(([sdk, accAddress]) => { + const combined$ = combineLatest([accAddress$, valAddress$]); + this.totalRewards$ = accAddress$.pipe( + mergeMap((accAddress) => { if (accAddress === undefined) { return of(undefined); } - return cosmosclient.rest.distribution - .delegationTotalRewards(sdk.rest, accAddress) - .then((res) => res.data); + return this.cosmosRest.getDelegationTotalRewards$(accAddress); }), ); this.commission$ = combined$.pipe( - mergeMap(([sdk, accAddress, valAddress]) => { + mergeMap(([accAddress, valAddress]) => { if (accAddress === undefined || valAddress === undefined) { return of(undefined); } - return cosmosclient.rest.distribution.validatorCommission(sdk.rest, valAddress).then((res) => res.data); + return this.cosmosRest.getValidatorCommission$(valAddress); }), ); this.isValidator$ = valAddress$.pipe( @@ -138,7 +135,7 @@ export class DelegateMenuDialogComponent implements OnInit { ); } - ngOnInit() { } + ngOnInit() {} onSubmitDelegate(validator: InlineResponse20041Validators) { this.matDialogRef.close(); diff --git a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index 880b9a347..6d8f5667c 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -6,14 +6,14 @@ import { InlineResponse20038, InlineResponse20041Validators, } from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { StakingApplicationService } from 'projects/portal/src/app/models/cosmos/staking.application.service'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; import { WalletService } from 'projects/portal/src/app/models/wallets/wallet.service'; import { InactiveValidatorConfirmDialogComponent } from 'projects/portal/src/app/views/dialogs/delegate/invalid-validator-confirm-dialog/inactive-validator-confirm-dialog.component'; import { RedelegateOnSubmitEvent } from 'projects/portal/src/app/views/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component'; -import { combineLatest, Observable } from 'rxjs'; +import { Observable } from 'rxjs'; import { filter, map, mergeMap } from 'rxjs/operators'; @Component({ @@ -35,27 +35,23 @@ export class RedelegateFormDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public readonly data: InlineResponse20041Validators, public matDialogRef: MatDialogRef, - private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, private readonly configS: ConfigService, private readonly stakingAppService: StakingApplicationService, private readonly snackBar: MatSnackBar, private readonly dialog: MatDialog, + private readonly cosmosRest: CosmosRestService, ) { this.validator = data; - this.validatorsList$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk.rest)), - map((result) => result.data.validators), - ); + this.validatorsList$ = this.cosmosRest.getValidators$().pipe(map((res) => res.validators)); this.currentStoredWallet$ = this.walletService.currentStoredWallet$; const address$ = this.currentStoredWallet$.pipe( filter((wallet): wallet is StoredWallet => wallet !== undefined && wallet !== null), map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - this.delegations$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorDelegations(sdk.rest, address)), - map((res) => res.data), + this.delegations$ = address$.pipe( + mergeMap((address) => this.cosmosRest.getDelegatorDelegations$(address)), ); this.delegateAmount$ = this.delegations$.pipe( map( @@ -66,11 +62,7 @@ export class RedelegateFormDialogComponent implements OnInit { )?.balance, ), ); - - this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), - map((result) => result.data.balances), - ); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); this.uguuBalance$ = this.coins$.pipe( map((coins) => { const balance = coins?.find((coin) => coin.denom == 'uguu'); @@ -81,7 +73,7 @@ export class RedelegateFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} async onSubmit($event: RedelegateOnSubmitEvent) { const validatorStatus = $event.validatorList.find( diff --git a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts index 2c8adba5a..2dbc89fa4 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts @@ -3,16 +3,16 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import cosmosclient from '@cosmos-client/core'; import { InlineResponse20038, - InlineResponse20047, InlineResponse20041Validators, + InlineResponse20047, } from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { StakingApplicationService } from 'projects/portal/src/app/models/cosmos/staking.application.service'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; import { WalletService } from 'projects/portal/src/app/models/wallets/wallet.service'; import { UndelegateOnSubmitEvent } from 'projects/portal/src/app/views/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component'; -import { of, combineLatest, Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; import { filter, map, mergeMap } from 'rxjs/operators'; @Component({ @@ -34,10 +34,10 @@ export class UndelegateFormDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public readonly data: InlineResponse20041Validators, public matDialogRef: MatDialogRef, - private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, private readonly configS: ConfigService, private readonly stakingAppService: StakingApplicationService, + private readonly cosmosRest: CosmosRestService, ) { this.validator = data; this.currentStoredWallet$ = this.walletService.currentStoredWallet$; @@ -45,25 +45,18 @@ export class UndelegateFormDialogComponent implements OnInit { filter((wallet): wallet is StoredWallet => wallet !== undefined && wallet !== null), map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - this.delegations$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.staking.delegatorDelegations(sdk.rest, address)), - map((res) => res.data), + this.delegations$ = address$.pipe( + mergeMap((address) => this.cosmosRest.getDelegatorDelegations$(address)), ); - this.unbondingDelegation$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => { + + this.unbondingDelegation$ = address$.pipe( + mergeMap((address) => { const valAddressString = this.validator?.operator_address; if (!valAddressString) { return of(undefined); } const valAddress = cosmosclient.ValAddress.fromString(valAddressString); - const unbondingDelegation = cosmosclient.rest.staking - .unbondingDelegation(sdk.rest, valAddress, address) - .then((res) => res.data) - .catch((error) => { - console.error(error.message); - return undefined; - }); - return unbondingDelegation; + return this.cosmosRest.getUnbondingDelegation$(valAddress, address); }), ); this.delegateAmount$ = this.delegations$.pipe( @@ -75,11 +68,7 @@ export class UndelegateFormDialogComponent implements OnInit { )?.balance, ), ); - - this.coins$ = combineLatest([this.cosmosSDK.sdk$, address$]).pipe( - mergeMap(([sdk, address]) => cosmosclient.rest.bank.allBalances(sdk.rest, address)), - map((result) => result.data.balances), - ); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); this.uguuBalance$ = this.coins$.pipe( map((coins) => { const balance = coins?.find((coin) => coin.denom == 'uguu'); @@ -90,7 +79,7 @@ export class UndelegateFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} async onSubmit($event: UndelegateOnSubmitEvent) { const txHash = await this.stakingAppService.undelegate( diff --git a/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts index f94a2a6f3..ca2bd53ed 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/withdraw-delegator-reward-form-dialog/withdraw-delegator-reward-form-dialog.component.ts @@ -2,7 +2,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { DistributionApplicationService } from 'projects/portal/src/app/models/cosmos/distribution.application.service'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -25,7 +24,6 @@ export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public readonly data: InlineResponse20041Validators, public matDialogRef: MatDialogRef, - private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, private readonly configS: ConfigService, private readonly distributionAppService: DistributionApplicationService, @@ -35,7 +33,7 @@ export class WithdrawDelegatorRewardFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} async onSubmit($event: WithdrawDelegatorRewardOnSubmitEvent) { const txHash = await this.distributionAppService.withdrawDelegatorReward( diff --git a/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts index 599cfd314..8b061e42b 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/withdraw-validator-commission-form-dialog/withdraw-validator-commission-form-dialog.component.ts @@ -2,7 +2,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import cosmosclient from '@cosmos-client/core'; import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; import { DistributionApplicationService } from 'projects/portal/src/app/models/cosmos/distribution.application.service'; import { StoredWallet } from 'projects/portal/src/app/models/wallets/wallet.model'; @@ -25,7 +24,6 @@ export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { @Inject(MAT_DIALOG_DATA) public readonly data: InlineResponse20041Validators, public matDialogRef: MatDialogRef, - private readonly cosmosSDK: CosmosSDKService, private readonly walletService: WalletService, private readonly configS: ConfigService, private readonly distributionAppService: DistributionApplicationService, @@ -35,7 +33,7 @@ export class WithdrawValidatorCommissionFormDialogComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} async onSubmit($event: WithdrawValidatorCommissionOnSubmitEvent) { const txHash = await this.distributionAppService.withdrawValidatorCommission( From 882694b421e110679be20db044a48561ae7ce52e Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:35:31 +0900 Subject: [PATCH 65/77] fix: split rest from home.component --- .../src/app/models/cosmos-rest.service.ts | 7 +++++ .../src/app/pages/home/home.component.ts | 30 ++++++------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index 25032fac4..bedaa3451 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -35,6 +35,13 @@ export class CosmosRestService { ); } + getSyncing$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.tendermint.getSyncing(sdk)), + map((res) => res.data.syncing || false), + ); + } + allBalances$( cosmosAccAddress: cosmosclient.AccAddress, ): Observable { diff --git a/projects/portal/src/app/pages/home/home.component.ts b/projects/portal/src/app/pages/home/home.component.ts index 34fe1ac60..cc4aa5476 100644 --- a/projects/portal/src/app/pages/home/home.component.ts +++ b/projects/portal/src/app/pages/home/home.component.ts @@ -1,35 +1,23 @@ -import { CosmosSDKService } from '../../models/cosmos-sdk.service'; -import { Component, OnDestroy, OnInit } from '@angular/core'; -import cosmosclient from '@cosmos-client/core'; +import { CosmosRestService } from '../../models/cosmos-rest.service'; +import { Component, OnInit } from '@angular/core'; import { InlineResponse20012 } from '@cosmos-client/core/esm/openapi'; -import { combineLatest, Observable, timer } from 'rxjs'; -import { mergeMap, map } from 'rxjs/operators'; +import { Observable, timer } from 'rxjs'; +import { mergeMap } from 'rxjs/operators'; @Component({ selector: 'app-home', templateUrl: './home.component.html', styleUrls: ['./home.component.css'], }) -export class HomeComponent implements OnInit, OnDestroy { +export class HomeComponent implements OnInit { nodeInfo$: Observable; syncing$: Observable; - constructor(private cosmosSDK: CosmosSDKService) { + constructor(private cosmosRest: CosmosRestService) { const timer$ = timer(0, 60 * 60 * 1000); - const combined$ = combineLatest([timer$, this.cosmosSDK.sdk$]).pipe(map(([_, sdk]) => sdk)); - - this.nodeInfo$ = combined$.pipe( - mergeMap((sdk) => cosmosclient.rest.tendermint.getNodeInfo(sdk.rest).then((res) => res.data)), - ); - - this.syncing$ = combined$.pipe( - mergeMap((sdk) => - cosmosclient.rest.tendermint.getSyncing(sdk.rest).then((res) => res.data.syncing || false), - ), - ); + this.nodeInfo$ = timer$.pipe(mergeMap(() => this.cosmosRest.getNodeInfo$())); + this.syncing$ = timer$.pipe(mergeMap(() => this.cosmosRest.getSyncing$())); } - ngOnInit() { } - - ngOnDestroy() { } + ngOnInit() {} } From bdf799dc7005cb88e524ac8bdb0110070a448647 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 17:12:59 +0900 Subject: [PATCH 66/77] fix: split rest from home --- .../src/app/models/cosmos-rest.service.ts | 59 +++++++++++++++ .../pages/home/accounts/accounts.component.ts | 50 +++++-------- .../src/app/pages/home/bank/bank.component.ts | 20 ++---- .../app/pages/home/blocks/blocks.component.ts | 17 ++--- .../distribution/distribution.component.ts | 16 ++--- .../src/app/pages/home/mint/mint.component.ts | 20 ++---- .../src/app/pages/home/txs/txs.component.ts | 72 +++++-------------- 7 files changed, 113 insertions(+), 141 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index bedaa3451..17f21d96f 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -3,9 +3,13 @@ import { Injectable } from '@angular/core'; import cosmosclient from '@cosmos-client/core'; import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; import { + CosmosDistributionV1beta1QueryCommunityPoolResponse as CommunityPoolResponse, CosmosDistributionV1beta1QueryDelegationTotalRewardsResponse as DelegationTotalRewardsResponse, CosmosDistributionV1beta1QueryValidatorSlashesResponse as ValidatorSlashesResponse, + CosmosMintV1beta1QueryAnnualProvisionsResponse as AnnualProvisionsResponse, + CosmosMintV1beta1QueryInflationResponse as InflationResponse, CosmosTxV1beta1GetTxsEventResponse as TxsEventResponse, + InlineResponse20010, InlineResponse20012 as InlineResponse, InlineResponse20022, InlineResponse20027Proposals, @@ -14,6 +18,7 @@ import { InlineResponse20041, InlineResponse20041Validators as Validators, InlineResponse20047, + QueryTotalSupplyResponseIsTheResponseTypeForTheQueryTotalSupplyRPCMethod as TotalSupplyResponse, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod as ValidatorCommissionResponse, QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod as ValidatorsResponse, } from '@cosmos-client/core/esm/openapi'; @@ -42,6 +47,13 @@ export class CosmosRestService { ); } + getLatestBlock$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.tendermint.getLatestBlock(sdk)), + map((res) => res.data), + ); + } + allBalances$( cosmosAccAddress: cosmosclient.AccAddress, ): Observable { @@ -52,6 +64,13 @@ export class CosmosRestService { ); } + getTotalSupply$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.bank.totalSupply(sdk)), + map((res) => res.data), + ); + } + getAccount$(cosmosAccAddress: cosmosclient.AccAddress): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.auth.account(sdk, cosmosAccAddress)), @@ -82,6 +101,26 @@ export class CosmosRestService { ); } + getSelectedTxTypeEvent$( + selectedTxType: string, + paginationOffset?: bigint | undefined, + paginationLimit?: bigint | undefined, + ): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => + cosmosclient.rest.tx.getTxsEvent( + sdk, + [`message.module='${selectedTxType}'`], + undefined, + paginationOffset, + paginationLimit, + true, + ), + ), + map((res) => res.data), + ); + } + getDelegationTotalRewards$( accAddress: cosmosclient.AccAddress, ): Observable { @@ -182,6 +221,26 @@ export class CosmosRestService { ); } + getAnnualProvisions$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.mint.annualProvisions(sdk)), + map((res) => res.data), + ); + } + getInflation$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.mint.inflation(sdk)), + map((res) => res.data), + ); + } + + getCommunityPool$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.distribution.communityPool(sdk)), + map((res) => res.data), + ); + } + private _handleError(error: any): Observable { console.error(error); return of(undefined); diff --git a/projects/portal/src/app/pages/home/accounts/accounts.component.ts b/projects/portal/src/app/pages/home/accounts/accounts.component.ts index 4e1a6bb0a..d91101aef 100644 --- a/projects/portal/src/app/pages/home/accounts/accounts.component.ts +++ b/projects/portal/src/app/pages/home/accounts/accounts.component.ts @@ -1,9 +1,9 @@ -import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { Key } from '../../../models/keys/key.model'; import { KeyService } from '../../../models/keys/key.service'; import { Component, OnInit } from '@angular/core'; import cosmosclient from '@cosmos-client/core'; -import { combineLatest, from, Observable, of } from 'rxjs'; +import { from, Observable } from 'rxjs'; import { filter, map, mergeMap } from 'rxjs/operators'; @Component({ @@ -18,7 +18,7 @@ export class AccountsComponent implements OnInit { balances1$: Observable; balances2$: Observable; - constructor(private readonly key: KeyService, private cosmosSDK: CosmosSDKService) { + constructor(private readonly key: KeyService, private cosmosRest: CosmosRestService) { this.keys$ = from(this.key.list()); const pubKeys$ = this.keys$.pipe( filter((keys) => !!keys), @@ -28,51 +28,33 @@ export class AccountsComponent implements OnInit { map((keys) => keys.map((key) => cosmosclient.AccAddress.fromPublicKey(key))), ); - this.balances0$ = combineLatest([this.cosmosSDK.sdk$, this.accAddresses$]).pipe( - mergeMap(([sdk, addresses]) => { - if (addresses === undefined) { + this.balances0$ = this.accAddresses$.pipe( + mergeMap((addresses) => { + if (addresses === undefined || addresses.length === 0) { return []; } - if (addresses[0] === undefined) { - return []; - } - return cosmosclient.rest.bank - .allBalances(sdk.rest, addresses[0]) - .then((res) => res.data.balances || []) - .catch((_) => []); + return this.cosmosRest.allBalances$(addresses[0]).pipe(map((res) => res || [])); }), ); - this.balances1$ = combineLatest([this.cosmosSDK.sdk$, this.accAddresses$]).pipe( - mergeMap(([sdk, addresses]) => { - if (addresses === undefined) { - return []; - } - if (addresses[1] === undefined) { + this.balances1$ = this.accAddresses$.pipe( + mergeMap((addresses) => { + if (addresses === undefined || addresses[1] === undefined) { return []; } - return cosmosclient.rest.bank - .allBalances(sdk.rest, addresses[1]) - .then((res) => res.data.balances || []) - .catch((_) => []); + return this.cosmosRest.allBalances$(addresses[1]).pipe(map((res) => res || [])); }), ); - this.balances2$ = combineLatest([this.cosmosSDK.sdk$, this.accAddresses$]).pipe( - mergeMap(([sdk, addresses]) => { - if (addresses === undefined) { - return []; - } - if (addresses[2] === undefined) { + this.balances2$ = this.accAddresses$.pipe( + mergeMap((addresses) => { + if (addresses === undefined || addresses[2] === undefined) { return []; } - return cosmosclient.rest.bank - .allBalances(sdk.rest, addresses[2]) - .then((res) => res.data.balances || []) - .catch((_) => []); + return this.cosmosRest.allBalances$(addresses[2]).pipe(map((res) => res || [])); }), ); } - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/projects/portal/src/app/pages/home/bank/bank.component.ts b/projects/portal/src/app/pages/home/bank/bank.component.ts index 6da407380..79509551e 100644 --- a/projects/portal/src/app/pages/home/bank/bank.component.ts +++ b/projects/portal/src/app/pages/home/bank/bank.component.ts @@ -1,10 +1,8 @@ +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import cosmosclient from '@cosmos-client/core'; import { QueryTotalSupplyResponseIsTheResponseTypeForTheQueryTotalSupplyRPCMethod } from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; -import { combineLatest, Observable, timer } from 'rxjs'; -import { map, mergeMap } from 'rxjs/operators'; +import { Observable, timer } from 'rxjs'; +import { mergeMap } from 'rxjs/operators'; @Component({ selector: 'app-bank', @@ -14,16 +12,10 @@ import { map, mergeMap } from 'rxjs/operators'; export class BankComponent implements OnInit { totalSupply$: Observable; - constructor( - private readonly route: ActivatedRoute, - private readonly cosmosSDK: CosmosSDKService, - ) { + constructor(private readonly cosmosRest: CosmosRestService) { const timer$ = timer(0, 60 * 60 * 1000); - const combined$ = combineLatest([timer$, this.cosmosSDK.sdk$]).pipe(map(([_, sdk]) => sdk)); - this.totalSupply$ = combined$.pipe( - mergeMap((sdk) => cosmosclient.rest.bank.totalSupply(sdk.rest).then((res) => res.data)), - ); + this.totalSupply$ = timer$.pipe(mergeMap(() => this.cosmosRest.getTotalSupply$())); } - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/projects/portal/src/app/pages/home/blocks/blocks.component.ts b/projects/portal/src/app/pages/home/blocks/blocks.component.ts index 95c09c645..69cef0e6b 100644 --- a/projects/portal/src/app/pages/home/blocks/blocks.component.ts +++ b/projects/portal/src/app/pages/home/blocks/blocks.component.ts @@ -1,9 +1,7 @@ +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import cosmosclient from '@cosmos-client/core'; -import { InlineResponse20011, InlineResponse20010 } from '@cosmos-client/core/esm/openapi'; -import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; -import { Observable, of, zip, timer } from 'rxjs'; +import { InlineResponse20010 } from '@cosmos-client/core/esm/openapi'; +import { Observable, of, timer } from 'rxjs'; import { catchError, map, mergeMap } from 'rxjs/operators'; @Component({ @@ -18,13 +16,10 @@ export class BlocksComponent implements OnInit { //latestBlocks$: Observable; latestBlocks$: Observable; - constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { + constructor(private cosmosRest: CosmosRestService) { const timer$ = timer(0, this.pollingInterval * 1000); // eslint-disable-next-line no-unused-vars - const sdk$ = timer$.pipe(mergeMap((_) => this.cosmosSDK.sdk$)); - this.latestBlock$ = sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.tendermint.getLatestBlock(sdk.rest).then((res) => res.data)), - ); + this.latestBlock$ = timer$.pipe(mergeMap((_) => this.cosmosRest.getLatestBlock$())); this.latestBlockHeight$ = this.latestBlock$.pipe( // eslint-disable-next-line no-undef map((latestBlock) => @@ -65,5 +60,5 @@ export class BlocksComponent implements OnInit { ); } - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/projects/portal/src/app/pages/home/distribution/distribution.component.ts b/projects/portal/src/app/pages/home/distribution/distribution.component.ts index 588ebd9d2..4bfa6e6f6 100644 --- a/projects/portal/src/app/pages/home/distribution/distribution.component.ts +++ b/projects/portal/src/app/pages/home/distribution/distribution.component.ts @@ -1,10 +1,7 @@ +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import cosmosclient from '@cosmos-client/core'; import { CosmosDistributionV1beta1QueryCommunityPoolResponse } from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { Observable } from 'rxjs'; -import { mergeMap } from 'rxjs/operators'; @Component({ selector: 'app-distribution', @@ -14,14 +11,9 @@ import { mergeMap } from 'rxjs/operators'; export class DistributionComponent implements OnInit { communityPool$: Observable; - constructor( - private readonly route: ActivatedRoute, - private readonly cosmosSDK: CosmosSDKService, - ) { - this.communityPool$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.distribution.communityPool(sdk.rest).then((res) => res.data)), - ); + constructor(private readonly cosmosRest: CosmosRestService) { + this.communityPool$ = this.cosmosRest.getCommunityPool$(); } - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/projects/portal/src/app/pages/home/mint/mint.component.ts b/projects/portal/src/app/pages/home/mint/mint.component.ts index 2f098fd98..49f4b9751 100644 --- a/projects/portal/src/app/pages/home/mint/mint.component.ts +++ b/projects/portal/src/app/pages/home/mint/mint.component.ts @@ -1,13 +1,10 @@ +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import cosmosclient from '@cosmos-client/core'; import { CosmosMintV1beta1QueryAnnualProvisionsResponse, CosmosMintV1beta1QueryInflationResponse, } from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { Observable } from 'rxjs'; -import { mergeMap } from 'rxjs/operators'; @Component({ selector: 'app-mint', @@ -18,17 +15,10 @@ export class MintComponent implements OnInit { inflation$: Observable; annualProvisions$: Observable; - constructor( - private readonly route: ActivatedRoute, - private readonly cosmosSDK: CosmosSDKService, - ) { - this.inflation$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.mint.inflation(sdk.rest).then((res) => res.data)), - ); - this.annualProvisions$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.mint.annualProvisions(sdk.rest).then((res) => res.data)), - ); + constructor(private readonly cosmosRest: CosmosRestService) { + this.inflation$ = this.cosmosRest.getInflation$(); + this.annualProvisions$ = this.cosmosRest.getAnnualProvisions$(); } - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/projects/portal/src/app/pages/home/txs/txs.component.ts b/projects/portal/src/app/pages/home/txs/txs.component.ts index 9db122085..ec6a48903 100644 --- a/projects/portal/src/app/pages/home/txs/txs.component.ts +++ b/projects/portal/src/app/pages/home/txs/txs.component.ts @@ -1,11 +1,9 @@ +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import cosmosclient from '@cosmos-client/core'; import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; -import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; import { BehaviorSubject, combineLatest, Observable, timer } from 'rxjs'; -import { filter, map, mergeMap, switchMap } from 'rxjs/operators'; +import { filter, map, switchMap } from 'rxjs/operators'; @Component({ selector: 'app-txs', @@ -22,41 +20,19 @@ export class TxsComponent implements OnInit { txsPageOffset$: Observable; selectedTxType$: BehaviorSubject = new BehaviorSubject('bank'); - constructor( - private route: ActivatedRoute, - private cosmosSDK: CosmosSDKService, - private configService: ConfigService, - ) { + constructor(private configService: ConfigService, private cosmosRest: CosmosRestService) { this.txTypeOptions$ = this.configService.config$.pipe( map((config) => config?.extension?.messageModules), ); const timer$ = timer(0, this.pollingInterval * 1000); - const sdk$ = timer$.pipe(mergeMap((_) => this.cosmosSDK.sdk$)); - this.txsTotalCount$ = combineLatest([ - sdk$, - this.pageNumber$, - this.pageSize$, - this.selectedTxType$, - ]).pipe( - switchMap(([sdk, _pageNumber, _pageSize, selectedTxType]) => { - return cosmosclient.rest.tx - .getTxsEvent( - sdk.rest, - [`message.module='${selectedTxType}'`], - undefined, - undefined, - undefined, - true, - ) - .then((res) => - res.data.pagination?.total ? BigInt(res.data.pagination?.total) : BigInt(0), - ) - .catch((error) => { - console.error(error); - return BigInt(0); - }); - }), + this.txsTotalCount$ = combineLatest([timer$, this.selectedTxType$]).pipe( + switchMap(([_, selectedTxType]) => + this.cosmosRest.getSelectedTxTypeEvent$(selectedTxType).pipe( + map((res) => res.pagination?.total), + map((total) => (total ? BigInt(total) : BigInt(0))), + ), + ), ); this.txsPageOffset$ = combineLatest([ @@ -71,17 +47,16 @@ export class TxsComponent implements OnInit { ); this.txs$ = combineLatest([ - sdk$, + timer$, this.selectedTxType$, this.pageSize$.asObservable(), this.txsPageOffset$, this.txsTotalCount$, ]).pipe( filter( - ([_sdk, _selectedTxType, _pageSize, _pageOffset, txTotalCount]) => - txTotalCount !== BigInt(0), + ([_, _selectedTxType, _pageSize, _pageOffset, txTotalCount]) => txTotalCount !== BigInt(0), ), - switchMap(([sdk, selectedTxType, pageSize, pageOffset, _txsTotalCount]) => { + switchMap(([_, selectedTxType, pageSize, pageOffset, _txsTotalCount]) => { const modifiedPageOffset = pageOffset < 1 ? BigInt(1) : pageOffset; const modifiedPageSize = pageOffset < 1 ? pageOffset + BigInt(pageSize) : BigInt(pageSize); @@ -89,28 +64,15 @@ export class TxsComponent implements OnInit { return []; } - return cosmosclient.rest.tx - .getTxsEvent( - sdk.rest, - [`message.module='${selectedTxType}'`], - undefined, - modifiedPageOffset, - modifiedPageSize, - true, - ) - .then((res) => { - return res.data.tx_responses; - }) - .catch((error) => { - console.error(error); - return []; - }); + return this.cosmosRest + .getSelectedTxTypeEvent$(selectedTxType, modifiedPageOffset, modifiedPageSize) + .pipe(map((res) => res.tx_responses)); }), map((txs) => txs?.reverse()), ); } - ngOnInit(): void { } + ngOnInit(): void {} appSelectedTxTypeChanged(selectedTxType: string): void { this.selectedTxType$.next(selectedTxType); From 45414cdabcf4edc64b9d49f3eaf20f93b4c3f506 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Wed, 6 Jul 2022 17:17:12 +0900 Subject: [PATCH 67/77] fix: split rest from keys --- .../src/app/pages/keys/key/key.component.ts | 30 ++++++++----------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/projects/portal/src/app/pages/keys/key/key.component.ts b/projects/portal/src/app/pages/keys/key/key.component.ts index 0cdd0467d..21e547426 100644 --- a/projects/portal/src/app/pages/keys/key/key.component.ts +++ b/projects/portal/src/app/pages/keys/key/key.component.ts @@ -1,5 +1,5 @@ import { Config, ConfigService } from '../../../models/config.service'; -import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { Key } from '../../../models/keys/key.model'; import { KeyService } from '../../../models/keys/key.service'; import { Component, OnInit } from '@angular/core'; @@ -22,20 +22,20 @@ export class KeyComponent implements OnInit { balances$: Observable; faucets$: Observable< | { - hasFaucet: boolean; - faucetURL: string; - denom: string; - creditAmount: number; - maxCredit: number; - }[] + hasFaucet: boolean; + faucetURL: string; + denom: string; + creditAmount: number; + maxCredit: number; + }[] | undefined >; constructor( private readonly route: ActivatedRoute, private readonly key: KeyService, - private cosmosSDK: CosmosSDKService, private configService: ConfigService, + private cosmosRest: CosmosRestService, ) { this.config$ = this.configService.config$; this.keyID$ = this.route.params.pipe(map((params) => params['key_id'])); @@ -47,16 +47,12 @@ export class KeyComponent implements OnInit { this.accAddress$ = pubKey$.pipe(map((key) => cosmosclient.AccAddress.fromPublicKey(key))); this.valAddress$ = pubKey$.pipe(map((key) => cosmosclient.ValAddress.fromPublicKey(key))); - - this.balances$ = combineLatest([this.cosmosSDK.sdk$, this.accAddress$]).pipe( - mergeMap(([sdk, address]) => { + this.balances$ = this.accAddress$.pipe( + mergeMap((address) => { if (address === undefined) { - return []; + return of([]); } - return cosmosclient.rest.bank - .allBalances(sdk.rest, address) - .then((res) => res.data.balances || []) - .catch((_) => []); + return this.cosmosRest.allBalances$(address).pipe(map((res) => res || [])); }), ); @@ -82,5 +78,5 @@ export class KeyComponent implements OnInit { ); } - ngOnInit(): void { } + ngOnInit(): void {} } From 1d00169564e7dfc91e17f51f987c0e0c6db58067 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Thu, 7 Jul 2022 14:45:09 +0900 Subject: [PATCH 68/77] fix: split rest from mint --- .../src/app/models/ununifi-rest.service.ts | 52 ++++++++++++++- .../app/pages/mint/cdps/cdp/cdp.component.ts | 65 ++++++++----------- .../mint/cdps/cdp/clear/clear.component.ts | 36 +++++----- .../cdps/cdp/deposit/deposit.component.ts | 26 ++++---- .../mint/cdps/cdp/issue/issue.component.ts | 54 ++++++++------- .../cdps/cdp/withdraw/withdraw.component.ts | 52 +++++++-------- .../src/app/pages/mint/cdps/cdps.component.ts | 32 ++++----- .../mint/cdps/create/create.component.ts | 50 +++++++------- .../src/app/pages/mint/mint.component.ts | 14 ++-- projects/portal/src/app/utils/stream.ts | 19 +----- 10 files changed, 203 insertions(+), 197 deletions(-) diff --git a/projects/portal/src/app/models/ununifi-rest.service.ts b/projects/portal/src/app/models/ununifi-rest.service.ts index 1b4802cc3..444811825 100644 --- a/projects/portal/src/app/models/ununifi-rest.service.ts +++ b/projects/portal/src/app/models/ununifi-rest.service.ts @@ -1,15 +1,32 @@ import { CosmosSDKService } from './cosmos-sdk.service'; import { Injectable } from '@angular/core'; import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; -import { Observable } from 'rxjs'; -import { map, mergeMap, pluck } from 'rxjs/operators'; +import { AccAddress } from '@cosmos-client/core/cjs/types'; +import { Observable, zip } from 'rxjs'; +import { filter, map, mergeMap, pluck } from 'rxjs/operators'; import ununifi from 'ununifi-client'; import { InlineResponse200, + InlineResponse20013Price, InlineResponse2002Params, + InlineResponse2004Cdp1, InlineResponse200Auctions, } from 'ununifi-client/esm/openapi'; +export const getCollateralParamsStream = ( + collateralType: Observable, + cdpParams: Observable, +) => + zip(collateralType, cdpParams).pipe( + map(([collateralType, params]) => { + return params.collateral_params?.find((param) => param.type === collateralType); + }), + filter( + (collateralParams): collateralParams is ununifi.proto.ununifi.cdp.CollateralParam => + collateralParams !== undefined, + ), + ); + @Injectable({ providedIn: 'root' }) export class UnunifiRestService { private restSdk$: Observable; @@ -18,6 +35,30 @@ export class UnunifiRestService { this.restSdk$ = this.cosmosSDK.sdk$.pipe(pluck('rest')); } + getCdpParams$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => ununifi.rest.cdp.params(sdk)), + map((res) => res.data.params!), + ); + } + + getCdp$( + address: AccAddress, + collateralType: string, + ): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => ununifi.rest.cdp.cdp(sdk, address, collateralType)), + map((res) => res.data.cdp || undefined), + ); + } + + getAllDeposits$(address: AccAddress, collateralType: string) { + return this.restSdk$.pipe( + mergeMap((sdk) => ununifi.rest.cdp.allDeposits(sdk, address, collateralType)), + map((res) => res.data.deposits!), + ); + } + getAuctionParams$(): Observable { return this.restSdk$.pipe( mergeMap((sdk) => ununifi.rest.auction.params(sdk)), @@ -43,4 +84,11 @@ export class UnunifiRestService { map((res) => res.data.auction), ); } + + getPrice$(marketID: string): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => ununifi.rest.pricefeed.price(sdk, marketID)), + map((res) => res.data.price!), + ); + } } diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts index c67dfeb8c..a0c83048c 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts @@ -1,9 +1,11 @@ -import { getWithdrawLimit, getIssueLimit } from '../../../../utils/function'; -import { getSpotPriceStream, getLiquidationPriceStream } from '../../../../utils/stream'; +import { getIssueLimit, getWithdrawLimit } from '../../../../utils/function'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; -import { CosmosSDKService } from 'projects/portal/src/app/models/index'; +import { + getCollateralParamsStream, + UnunifiRestService, +} from 'projects/portal/src/app/models/ununifi-rest.service'; import { combineLatest, Observable, zip } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; import ununifi from 'ununifi-client'; @@ -18,7 +20,7 @@ export class CdpComponent implements OnInit { owner$: Observable; collateralType$: Observable; denom$: Observable; - params$: Observable; + cdpParams$: Observable; cdp$: Observable; deposits$: Observable; @@ -29,15 +31,12 @@ export class CdpComponent implements OnInit { constructor( private readonly route: ActivatedRoute, - private readonly cosmosSdk: CosmosSDKService, + private readonly ununifiRest: UnunifiRestService, ) { this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); - this.params$ = this.cosmosSdk.sdk$.pipe( - mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), - map((data) => data.data.params!), - ); - this.denom$ = combineLatest([this.collateralType$, this.params$]).pipe( + this.cdpParams$ = this.ununifiRest.getCdpParams$(); + this.denom$ = combineLatest([this.collateralType$, this.cdpParams$]).pipe( map(([collateralType, params]) => { const matchedDenoms = params.collateral_params?.filter( (param) => param.type === collateralType, @@ -45,51 +44,43 @@ export class CdpComponent implements OnInit { return matchedDenoms ? (matchedDenoms[0].denom ? matchedDenoms[0].denom : '') : ''; }), ); - const ownerAndCollateralType$ = combineLatest([ - this.owner$, - this.collateralType$, - this.cosmosSdk.sdk$, - ]); + const ownerAndCollateralType$ = combineLatest([this.owner$, this.collateralType$]); this.cdp$ = ownerAndCollateralType$.pipe( - mergeMap(([ownerAddr, collateralType, sdk]) => - ununifi.rest.cdp.cdp( - sdk.rest, - cosmosclient.AccAddress.fromString(ownerAddr), - collateralType, - ), + mergeMap(([ownerAddr, collateralType]) => + this.ununifiRest.getCdp$(cosmosclient.AccAddress.fromString(ownerAddr), collateralType), ), - map((res) => res.data.cdp!), + map((res) => res!), ); this.deposits$ = ownerAndCollateralType$.pipe( - mergeMap(([ownerAddr, collateralType, sdk]) => - ununifi.rest.cdp - .allDeposits(sdk.rest, cosmosclient.AccAddress.fromString(ownerAddr), collateralType) - .catch((error) => { - console.error(error); - return undefined; - }), + mergeMap(([ownerAddr, collateralType]) => + this.ununifiRest.getAllDeposits$( + cosmosclient.AccAddress.fromString(ownerAddr), + collateralType, + ), ), - map((res) => res?.data.deposits || []), + map((res) => res || []), ); - this.spotPrice$ = this.cosmosSdk.sdk$.pipe( - mergeMap((sdk) => getSpotPriceStream(sdk.rest, this.collateralType$, this.params$)), + this.spotPrice$ = getCollateralParamsStream(this.collateralType$, this.cdpParams$).pipe( + mergeMap((collateralParams) => this.ununifiRest.getPrice$(collateralParams.spot_market_id)), ); - this.liquidationPrice$ = this.cosmosSdk.sdk$.pipe( - mergeMap((sdk) => getLiquidationPriceStream(sdk.rest, this.collateralType$, this.params$)), + this.liquidationPrice$ = getCollateralParamsStream(this.collateralType$, this.cdpParams$).pipe( + mergeMap((collateralParams) => + this.ununifiRest.getPrice$(collateralParams.liquidation_market_id), + ), ); - this.withdrawLimit$ = zip(this.cdp$, this.params$, this.spotPrice$).pipe( + this.withdrawLimit$ = zip(this.cdp$, this.cdpParams$, this.spotPrice$).pipe( map(([cdp, params, price]) => getWithdrawLimit(cdp.cdp!, params, price)), ); - this.issueLimit$ = zip(this.cdp$, this.params$, this.liquidationPrice$).pipe( + this.issueLimit$ = zip(this.cdp$, this.cdpParams$, this.liquidationPrice$).pipe( map(([cdp, params, price]) => getIssueLimit(cdp.cdp!, params, price)), ); } - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts index 1673c22da..8b1ba161c 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts @@ -2,13 +2,14 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; -import { CosmosSDKService } from 'projects/portal/src/app/models/index'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { CdpApplicationService } from 'projects/portal/src/app/models/index'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.service'; +import { UnunifiRestService } from 'projects/portal/src/app/models/ununifi-rest.service'; import { ClearCdpOnSubmitEvent } from 'projects/portal/src/app/views/mint/cdps/cdp/clear/clear.component'; -import { timer, of, combineLatest, Observable } from 'rxjs'; -import { map, mergeMap } from 'rxjs/operators'; +import { combineLatest, Observable, of, timer } from 'rxjs'; +import { map, mergeMap, withLatestFrom } from 'rxjs/operators'; import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @@ -36,8 +37,9 @@ export class ClearComponent implements OnInit { private readonly route: ActivatedRoute, private readonly keyStore: KeyStoreService, private readonly cdpApplicationService: CdpApplicationService, - private readonly cosmosSDK: CosmosSDKService, private readonly configS: ConfigService, + private readonly cosmosRest: CosmosRestService, + private readonly ununifiRest: UnunifiRestService, ) { this.key$ = this.keyStore.currentKey$.asObservable(); this.owner$ = this.route.params.pipe(map((params) => params['owner'])); @@ -56,31 +58,23 @@ export class ClearComponent implements OnInit { }), ); const timer$ = timer(0, this.pollingInterval * 1000); - this.balances$ = combineLatest([timer$, this.cosmosSDK.sdk$, this.address$]).pipe( - mergeMap(([n, sdk, address]) => { + this.balances$ = timer$.pipe( + withLatestFrom(this.address$), + mergeMap(([_, address]) => { if (address === undefined) { return of([]); } - return cosmosclient.rest.bank - .allBalances(sdk.rest, address) - .then((res) => res.data.balances || []); + return this.cosmosRest.allBalances$(address).pipe(map((res) => res || [])); }), ); - this.params$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), - map((data) => data.data.params!), - ); + this.params$ = this.ununifiRest.getCdpParams$(); - this.cdp$ = combineLatest([this.owner$, this.collateralType$, this.cosmosSDK.sdk$]).pipe( - mergeMap(([ownerAddr, collateralType, sdk]) => - ununifi.rest.cdp.cdp( - sdk.rest, - cosmosclient.AccAddress.fromString(ownerAddr), - collateralType, - ), + this.cdp$ = combineLatest([this.owner$, this.collateralType$]).pipe( + mergeMap(([ownerAddr, collateralType]) => + this.ununifiRest.getCdp$(cosmosclient.AccAddress.fromString(ownerAddr), collateralType), ), - map((res) => res.data.cdp!), + map((res) => res!), ); this.repaymentDenomString$ = combineLatest([this.params$, this.cdp$]).pipe( diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts index d4ae6f88c..c086d1c54 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts @@ -2,13 +2,14 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; -import { CosmosSDKService } from 'projects/portal/src/app/models/index'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { CdpApplicationService } from 'projects/portal/src/app/models/index'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.service'; +import { UnunifiRestService } from 'projects/portal/src/app/models/ununifi-rest.service'; import { DepositCdpOnSubmitEvent } from 'projects/portal/src/app/views/mint/cdps/cdp/deposit/deposit.component'; -import { timer, of, combineLatest, Observable } from 'rxjs'; -import { map, mergeMap } from 'rxjs/operators'; +import { combineLatest, Observable, of, timer } from 'rxjs'; +import { map, mergeMap, withLatestFrom } from 'rxjs/operators'; import ununifi from 'ununifi-client'; @Component({ @@ -29,18 +30,16 @@ export class DepositComponent implements OnInit { constructor( private readonly route: ActivatedRoute, - private readonly cosmosSDK: CosmosSDKService, private readonly keyStore: KeyStoreService, private readonly cdpApplicationService: CdpApplicationService, private readonly configS: ConfigService, + private readonly ununifiRest: UnunifiRestService, + private readonly cosmosRest: CosmosRestService, ) { this.key$ = this.keyStore.currentKey$.asObservable(); this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); - this.params$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), - map((data) => data.data.params!), - ); + this.params$ = this.ununifiRest.getCdpParams$(); //get account balance information this.address$ = this.owner$.pipe( @@ -55,14 +54,13 @@ export class DepositComponent implements OnInit { }), ); const timer$ = timer(0, this.pollingInterval * 1000); - this.balances$ = combineLatest([timer$, this.cosmosSDK.sdk$, this.address$]).pipe( - mergeMap(([n, sdk, address]) => { + this.balances$ = timer$.pipe( + withLatestFrom(this.address$), + mergeMap(([_, address]) => { if (address === undefined) { return of([]); } - return cosmosclient.rest.bank - .allBalances(sdk.rest, address) - .then((res) => res.data.balances || []); + return this.cosmosRest.allBalances$(address); }), ); @@ -86,7 +84,7 @@ export class DepositComponent implements OnInit { this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} onSubmit($event: DepositCdpOnSubmitEvent) { this.cdpApplicationService.depositCDP( diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts index 7c4eb75f0..4df0ee6b4 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts @@ -1,16 +1,19 @@ import { getIssueLimit } from '../../../../../utils/function'; -import { getLiquidationPriceStream } from '../../../../../utils/stream'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; -import { CosmosSDKService } from 'projects/portal/src/app/models/index'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { CdpApplicationService } from 'projects/portal/src/app/models/index'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.service'; +import { + getCollateralParamsStream, + UnunifiRestService, +} from 'projects/portal/src/app/models/ununifi-rest.service'; import { IssueCdpOnSubmitEvent } from 'projects/portal/src/app/views/mint/cdps/cdp/issue/issue.component'; -import { timer, of, zip, combineLatest, Observable } from 'rxjs'; -import { map, mergeMap } from 'rxjs/operators'; +import { combineLatest, Observable, of, timer, zip } from 'rxjs'; +import { map, mergeMap, withLatestFrom } from 'rxjs/operators'; import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @@ -23,7 +26,7 @@ export class IssueComponent implements OnInit { key$: Observable; owner$: Observable; collateralType$: Observable; - params$: Observable; + cdpParams$: Observable; principalDenom$: Observable; minimumGasPrices$: Observable; @@ -39,17 +42,15 @@ export class IssueComponent implements OnInit { private readonly route: ActivatedRoute, private readonly keyStore: KeyStoreService, private readonly cdpApplicationService: CdpApplicationService, - private readonly cosmosSDK: CosmosSDKService, private readonly configS: ConfigService, + private readonly ununifiRest: UnunifiRestService, + private readonly cosmosRest: CosmosRestService, ) { this.key$ = this.keyStore.currentKey$.asObservable(); this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); - this.params$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), - map((data) => data.data.params!), - ); + this.cdpParams$ = this.ununifiRest.getCdpParams$(); //get account balance information this.address$ = this.owner$.pipe( map((address) => { @@ -63,47 +64,44 @@ export class IssueComponent implements OnInit { }), ); const timer$ = timer(0, this.pollingInterval * 1000); - this.balances$ = combineLatest([timer$, this.cosmosSDK.sdk$, this.address$]).pipe( - mergeMap(([n, sdk, address]) => { + this.balances$ = timer$.pipe( + withLatestFrom(this.address$), + mergeMap(([_, address]) => { if (address === undefined) { return of([]); } - return cosmosclient.rest.bank - .allBalances(sdk.rest, address) - .then((res) => res.data.balances || []); + return this.cosmosRest.allBalances$(address); }), ); - this.cdp$ = combineLatest([this.owner$, this.collateralType$, this.cosmosSDK.sdk$]).pipe( - mergeMap(([ownerAddr, collateralType, sdk]) => - ununifi.rest.cdp.cdp( - sdk.rest, - cosmosclient.AccAddress.fromString(ownerAddr), - collateralType, - ), + this.cdp$ = combineLatest([this.owner$, this.collateralType$]).pipe( + mergeMap(([ownerAddr, collateralType]) => + this.ununifiRest.getCdp$(cosmosclient.AccAddress.fromString(ownerAddr), collateralType), ), - map((res) => res.data.cdp!), + map((res) => res!), ); - this.principalDenom$ = combineLatest([this.params$, this.cdp$]).pipe( + this.principalDenom$ = combineLatest([this.cdpParams$, this.cdp$]).pipe( map(([params, cdp]) => params.debt_params?.find((debtParam) => debtParam.denom == cdp.cdp?.principal?.denom), ), map((res) => res?.denom!), ); - this.liquidationPrice$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => getLiquidationPriceStream(sdk.rest, this.collateralType$, this.params$)), + this.liquidationPrice$ = getCollateralParamsStream(this.collateralType$, this.cdpParams$).pipe( + mergeMap((collateralParams) => + this.ununifiRest.getPrice$(collateralParams.liquidation_market_id), + ), ); - this.issueLimit$ = zip(this.cdp$, this.params$, this.liquidationPrice$).pipe( + this.issueLimit$ = zip(this.cdp$, this.cdpParams$, this.liquidationPrice$).pipe( map(([cdp, params, price]) => getIssueLimit(cdp.cdp!, params, price)), ); this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} onSubmit($event: IssueCdpOnSubmitEvent) { this.cdpApplicationService.drawCDP( diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts index 5df7c1a10..1280c0df9 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts @@ -1,16 +1,19 @@ import { getWithdrawLimit } from '../../../../../utils/function'; -import { getSpotPriceStream } from '../../../../../utils/stream'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; -import { CosmosSDKService } from 'projects/portal/src/app/models/index'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { CdpApplicationService } from 'projects/portal/src/app/models/index'; import { Key } from 'projects/portal/src/app/models/keys/key.model'; import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.service'; +import { + getCollateralParamsStream, + UnunifiRestService, +} from 'projects/portal/src/app/models/ununifi-rest.service'; import { WithdrawCdpOnSubmitEvent } from 'projects/portal/src/app/views/mint/cdps/cdp/withdraw/withdraw.component'; -import { timer, of, zip, combineLatest, Observable } from 'rxjs'; -import { mergeMap, map } from 'rxjs/operators'; +import { combineLatest, Observable, of, timer, zip } from 'rxjs'; +import { map, mergeMap, withLatestFrom } from 'rxjs/operators'; import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @@ -23,7 +26,7 @@ export class WithdrawComponent implements OnInit { key$: Observable; owner$: Observable; collateralType$: Observable; - params$: Observable; + cdpParams$: Observable; denom$: Observable; cdp$: Observable; @@ -37,19 +40,17 @@ export class WithdrawComponent implements OnInit { constructor( private readonly route: ActivatedRoute, - private readonly cosmosSDK: CosmosSDKService, private readonly keyStore: KeyStoreService, private readonly cdpApplicationService: CdpApplicationService, private readonly configS: ConfigService, + private readonly ununifiRest: UnunifiRestService, + private readonly cosmosRest: CosmosRestService, ) { this.key$ = this.keyStore.currentKey$.asObservable(); this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); - this.params$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), - map((data) => data.data.params!), - ); - this.denom$ = combineLatest([this.collateralType$, this.params$]).pipe( + this.cdpParams$ = this.ununifiRest.getCdpParams$(); + this.denom$ = combineLatest([this.collateralType$, this.cdpParams$]).pipe( map(([collateralType, params]) => { const matchedDenoms = params.collateral_params?.filter( (param) => param.type === collateralType, @@ -71,40 +72,35 @@ export class WithdrawComponent implements OnInit { }), ); const timer$ = timer(0, this.pollingInterval * 1000); - this.balances$ = combineLatest([timer$, this.cosmosSDK.sdk$, this.address$]).pipe( - mergeMap(([n, sdk, address]) => { + this.balances$ = timer$.pipe( + withLatestFrom(this.address$), + mergeMap(([_, address]) => { if (address === undefined) { return of([]); } - return cosmosclient.rest.bank - .allBalances(sdk.rest, address) - .then((res) => res.data.balances || []); + return this.cosmosRest.allBalances$(address); }), ); - this.cdp$ = combineLatest([this.owner$, this.collateralType$, this.cosmosSDK.sdk$]).pipe( - mergeMap(([ownerAddr, collateralType, sdk]) => - ununifi.rest.cdp.cdp( - sdk.rest, - cosmosclient.AccAddress.fromString(ownerAddr), - collateralType, - ), + this.cdp$ = combineLatest([this.owner$, this.collateralType$]).pipe( + mergeMap(([ownerAddr, collateralType]) => + this.ununifiRest.getCdp$(cosmosclient.AccAddress.fromString(ownerAddr), collateralType), ), - map((res) => res.data.cdp!), + map((res) => res!), ); - this.spotPrice$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => getSpotPriceStream(sdk.rest, this.collateralType$, this.params$)), + this.spotPrice$ = getCollateralParamsStream(this.collateralType$, this.cdpParams$).pipe( + mergeMap((collateralParams) => this.ununifiRest.getPrice$(collateralParams.spot_market_id)), ); - this.withdrawLimit$ = zip(this.cdp$, this.params$, this.spotPrice$).pipe( + this.withdrawLimit$ = zip(this.cdp$, this.cdpParams$, this.spotPrice$).pipe( map(([cdp, params, price]) => getWithdrawLimit(cdp.cdp!, params, price)), ); this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} onSubmit($event: WithdrawCdpOnSubmitEvent) { this.cdpApplicationService.withdrawCDP( diff --git a/projects/portal/src/app/pages/mint/cdps/cdps.component.ts b/projects/portal/src/app/pages/mint/cdps/cdps.component.ts index 63d65f013..11eb5b71a 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdps.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdps.component.ts @@ -1,11 +1,11 @@ -import { CosmosSDKService, KeyService } from '../../../models/index'; +import { KeyService } from '../../../models/index'; import { Key } from '../../../models/keys/key.model'; import { KeyStoreService } from '../../../models/keys/key.store.service'; +import { UnunifiRestService } from '../../../models/ununifi-rest.service'; import { Component, OnInit } from '@angular/core'; import cosmosclient from '@cosmos-client/core'; -import { combineLatest, Observable, of } from 'rxjs'; -import { catchError, filter, map, mergeMap } from 'rxjs/operators'; -import ununifi from 'ununifi-client'; +import { combineLatest, Observable } from 'rxjs'; +import { filter, map, mergeMap } from 'rxjs/operators'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @Component({ @@ -19,7 +19,7 @@ export class CdpsComponent implements OnInit { constructor( private readonly key: KeyService, private readonly keyStore: KeyStoreService, - private readonly cosmosSdk: CosmosSDKService, + private readonly ununifiRest: UnunifiRestService, ) { const key$ = this.keyStore.currentKey$.asObservable(); const address$ = key$.pipe( @@ -29,24 +29,20 @@ export class CdpsComponent implements OnInit { ), ); - const collateralTypes$ = this.cosmosSdk.sdk$.pipe( - mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), - map((res) => res.data?.params?.collateral_params?.map((p) => p.type!) || []), - ); - this.cdps$ = combineLatest([address$, collateralTypes$, this.cosmosSdk.sdk$]).pipe( - mergeMap(([address, collateralTypes, sdk]) => - Promise.all( + const collateralTypes$ = this.ununifiRest + .getCdpParams$() + .pipe(map((res) => res.collateral_params?.map((p) => p.type!) || [])); + + this.cdps$ = combineLatest([address$, collateralTypes$]).pipe( + mergeMap(([address, collateralTypes]) => + combineLatest( collateralTypes.map((collateralType) => - ununifi.rest.cdp.cdp(sdk.rest, address, collateralType).catch((err) => { - console.log(err); - return; - }), + this.ununifiRest.getCdp$(address, collateralType), ), ), ), - map((result) => result.map((res) => (res ? res.data.cdp! : undefined))), ); } - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/projects/portal/src/app/pages/mint/cdps/create/create.component.ts b/projects/portal/src/app/pages/mint/cdps/create/create.component.ts index 7c1ebd912..68f48f1e1 100644 --- a/projects/portal/src/app/pages/mint/cdps/create/create.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/create/create.component.ts @@ -1,14 +1,18 @@ -import { CdpApplicationService, CosmosSDKService } from '../../../../models/index'; +import { CdpApplicationService } from '../../../../models/index'; import { Key } from '../../../../models/keys/key.model'; import { KeyService } from '../../../../models/keys/key.service'; import { getCreateLimit } from '../../../../utils/function'; -import { getLiquidationPriceStream } from '../../../../utils/stream'; import { CreateCdpOnSubmitEvent } from '../../../../views/mint/cdps/create/create.component'; import { Component, OnInit } from '@angular/core'; import cosmosclient from '@cosmos-client/core'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { KeyStoreService } from 'projects/portal/src/app/models/keys/key.store.service'; -import { timer, of, combineLatest, BehaviorSubject, Observable, Subject } from 'rxjs'; +import { + getCollateralParamsStream, + UnunifiRestService, +} from 'projects/portal/src/app/models/ununifi-rest.service'; +import { BehaviorSubject, combineLatest, Observable, of, Subject, timer } from 'rxjs'; import { filter, map, mergeMap } from 'rxjs/operators'; import ununifi from 'ununifi-client'; import { InlineResponse2004Cdp1 } from 'ununifi-client/esm/openapi'; @@ -24,7 +28,9 @@ export class CreateComponent implements OnInit { collateralParams$: Observable; selectedCollateralTypeSubject: Subject; selectedCollateralType$: Observable; - selectedCollateralParam$: Observable; + selectedCollateralParam$: Observable< + ununifi.proto.ununifi.cdp.ICollateralParam | null | undefined + >; minimumGasPrices$: Observable; address$: Observable; @@ -44,14 +50,13 @@ export class CreateComponent implements OnInit { private readonly key: KeyService, private readonly keyStore: KeyStoreService, private readonly cdpApplicationService: CdpApplicationService, - private readonly cosmosSDK: CosmosSDKService, private readonly configS: ConfigService, + private readonly ununifiRest: UnunifiRestService, + private readonly cosmosRest: CosmosRestService, ) { this.key$ = this.keyStore.currentKey$.asObservable(); - this.cdpParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => ununifi.rest.cdp.params(sdk.rest)), - map((param) => param.data.params!), - ); + this.cdpParams$ = this.ununifiRest.getCdpParams$(); + this.collateralParams$ = this.cdpParams$.pipe(map((cdpParams) => cdpParams?.collateral_params)); this.selectedCollateralTypeSubject = new Subject(); this.collateralParams$.subscribe((collateralParams) => { @@ -89,14 +94,12 @@ export class CreateComponent implements OnInit { ), ); const timer$ = timer(0, this.pollingInterval * 1000); - this.balances$ = combineLatest([timer$, this.cosmosSDK.sdk$, this.address$]).pipe( - mergeMap(([n, sdk, address]) => { + this.balances$ = combineLatest([timer$, this.address$]).pipe( + mergeMap(([_, address]) => { if (address === undefined) { return of([]); } - return cosmosclient.rest.bank - .allBalances(sdk.rest, address) - .then((res) => res.data.balances || []); + return this.cosmosRest.allBalances$(address); }), ); @@ -119,9 +122,12 @@ export class CreateComponent implements OnInit { // get principal limit this.collateralType$ = this.selectedCollateralType$.pipe(map((type) => (type ? type : ''))); - this.liquidationPrice$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => getLiquidationPriceStream(sdk.rest, this.collateralType$, this.cdpParams$)), + this.liquidationPrice$ = getCollateralParamsStream(this.collateralType$, this.cdpParams$).pipe( + mergeMap((collateralParams) => + this.ununifiRest.getPrice$(collateralParams.liquidation_market_id), + ), ); + this.principalLimit$ = combineLatest([ this.collateralType$, this.cdpParams$, @@ -134,20 +140,16 @@ export class CreateComponent implements OnInit { ); // check cdp - this.cdp$ = combineLatest([this.address$, this.collateralType$, this.cosmosSDK.sdk$]).pipe( - mergeMap(([ownerAddr, collateralType, sdk]) => - ununifi.rest.cdp.cdp(sdk.rest, ownerAddr, collateralType).catch((err) => { - console.error(err); - return; - }), + this.cdp$ = combineLatest([this.address$, this.collateralType$]).pipe( + mergeMap(([ownerAddr, collateralType]) => + this.ununifiRest.getCdp$(ownerAddr, collateralType), ), - map((res) => (res ? res.data.cdp : undefined)), ); this.minimumGasPrices$ = this.configS.config$.pipe(map((config) => config?.minimumGasPrices)); } - ngOnInit(): void { } + ngOnInit(): void {} onSubmit($event: CreateCdpOnSubmitEvent) { this.cdpApplicationService.createCDP( diff --git a/projects/portal/src/app/pages/mint/mint.component.ts b/projects/portal/src/app/pages/mint/mint.component.ts index 66848db81..707b6b17f 100644 --- a/projects/portal/src/app/pages/mint/mint.component.ts +++ b/projects/portal/src/app/pages/mint/mint.component.ts @@ -1,6 +1,6 @@ -import { CosmosSDKService } from '../../models/cosmos-sdk.service'; +import { UnunifiRestService } from '../../models/ununifi-rest.service'; import { Component, OnInit } from '@angular/core'; -import { combineLatest, Observable, timer } from 'rxjs'; +import { Observable, timer } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; import ununifi from 'ununifi-client'; @@ -14,16 +14,12 @@ export class MintComponent implements OnInit { collateralParams$: Observable; debtParams$: Observable; - constructor(private cosmosSDK: CosmosSDKService) { + constructor(private ununifiRest: UnunifiRestService) { const timer$ = timer(0, 60 * 1000); - - this.cdpParams$ = combineLatest([this.cosmosSDK.sdk$, timer$]).pipe( - mergeMap(([sdk, _]) => ununifi.rest.cdp.params(sdk.rest)), - map((res) => res.data.params!), - ); + this.cdpParams$ = timer$.pipe(mergeMap(() => this.ununifiRest.getCdpParams$())); this.collateralParams$ = this.cdpParams$.pipe(map((cdpParams) => cdpParams?.collateral_params)); this.debtParams$ = this.cdpParams$.pipe(map((cdpParams) => cdpParams?.debt_params)); } - ngOnInit(): void { } + ngOnInit(): void {} } diff --git a/projects/portal/src/app/utils/stream.ts b/projects/portal/src/app/utils/stream.ts index 4ccbbbac2..e6cf5dd75 100644 --- a/projects/portal/src/app/utils/stream.ts +++ b/projects/portal/src/app/utils/stream.ts @@ -1,22 +1,9 @@ +import { getCollateralParamsStream } from '../models/ununifi-rest.service'; import cosmosclient from '@cosmos-client/core'; -import { Observable, zip } from 'rxjs'; -import { map, mergeMap, filter } from 'rxjs/operators'; +import { Observable } from 'rxjs'; +import { map, mergeMap } from 'rxjs/operators'; import ununifi from 'ununifi-client'; -const getCollateralParamsStream = ( - collateralType: Observable, - cdpParams: Observable, -) => - zip(collateralType, cdpParams).pipe( - map(([collateralType, params]) => { - return params.collateral_params?.find((param) => param.type === collateralType); - }), - filter( - (collateralParams): collateralParams is ununifi.proto.ununifi.cdp.CollateralParam => - collateralParams !== undefined, - ), - ); - export const getSpotPriceStream = ( sdk: cosmosclient.CosmosSDK, collateralType: Observable, From e19a734f7fc00e9d5603683eb115b70b9815ded0 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Thu, 7 Jul 2022 14:59:22 +0900 Subject: [PATCH 69/77] fix: split rest from txs --- .../src/app/models/cosmos-rest.service.ts | 7 ++ .../src/app/pages/txs/tx/tx.component.ts | 13 ++-- .../portal/src/app/pages/txs/txs.component.ts | 66 ++++++------------- 3 files changed, 33 insertions(+), 53 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index 17f21d96f..67f86ddf3 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -8,6 +8,7 @@ import { CosmosDistributionV1beta1QueryValidatorSlashesResponse as ValidatorSlashesResponse, CosmosMintV1beta1QueryAnnualProvisionsResponse as AnnualProvisionsResponse, CosmosMintV1beta1QueryInflationResponse as InflationResponse, + CosmosTxV1beta1GetTxResponse as TxResponse, CosmosTxV1beta1GetTxsEventResponse as TxsEventResponse, InlineResponse20010, InlineResponse20012 as InlineResponse, @@ -53,6 +54,12 @@ export class CosmosRestService { map((res) => res.data), ); } + getTx$(hash: string): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.tx.getTx(sdk, hash)), + map((res) => res.data), + ); + } allBalances$( cosmosAccAddress: cosmosclient.AccAddress, diff --git a/projects/portal/src/app/pages/txs/tx/tx.component.ts b/projects/portal/src/app/pages/txs/tx/tx.component.ts index 9642ea02a..45c488978 100644 --- a/projects/portal/src/app/pages/txs/tx/tx.component.ts +++ b/projects/portal/src/app/pages/txs/tx/tx.component.ts @@ -1,9 +1,8 @@ -import { CosmosSDKService } from '../../../models/cosmos-sdk.service'; +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import cosmosclient from '@cosmos-client/core'; import { CosmosTxV1beta1GetTxResponse } from '@cosmos-client/core/esm/openapi'; -import { combineLatest, Observable } from 'rxjs'; +import { Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @Component({ @@ -15,12 +14,10 @@ export class TxComponent implements OnInit { txHash$: Observable; tx$: Observable; - constructor(private route: ActivatedRoute, private cosmosSDK: CosmosSDKService) { + constructor(private route: ActivatedRoute, private cosmosRest: CosmosRestService) { this.txHash$ = this.route.params.pipe(map((params) => params.tx_hash)); - this.tx$ = combineLatest([this.cosmosSDK.sdk$, this.txHash$]).pipe( - mergeMap(([sdk, hash]) => cosmosclient.rest.tx.getTx(sdk.rest, hash).then((res) => res.data)), - ); + this.tx$ = this.txHash$.pipe(mergeMap((hash) => this.cosmosRest.getTx$(hash))); } - ngOnInit() { } + ngOnInit() {} } diff --git a/projects/portal/src/app/pages/txs/txs.component.ts b/projects/portal/src/app/pages/txs/txs.component.ts index 63ded8ae9..c070e7c80 100644 --- a/projects/portal/src/app/pages/txs/txs.component.ts +++ b/projects/portal/src/app/pages/txs/txs.component.ts @@ -1,12 +1,11 @@ +import { CosmosRestService } from '../../models/cosmos-rest.service'; import { Component, OnInit } from '@angular/core'; import { PageEvent } from '@angular/material/paginator'; -import { Router, ActivatedRoute } from '@angular/router'; -import cosmosclient from '@cosmos-client/core'; +import { ActivatedRoute, Router } from '@angular/router'; import { InlineResponse20050TxResponse } from '@cosmos-client/core/esm/openapi/api'; import { ConfigService } from 'projects/portal/src/app/models/config.service'; -import { CosmosSDKService } from 'projects/portal/src/app/models/cosmos-sdk.service'; -import { of, combineLatest, Observable, timer } from 'rxjs'; -import { map, mergeMap, switchMap, distinctUntilChanged, withLatestFrom } from 'rxjs/operators'; +import { combineLatest, Observable, of, timer } from 'rxjs'; +import { distinctUntilChanged, map, mergeMap, switchMap, withLatestFrom } from 'rxjs/operators'; export type PaginationInfo = { pageSize: number; @@ -38,14 +37,13 @@ export class TxsComponent implements OnInit { constructor( private router: Router, private route: ActivatedRoute, - private cosmosSDK: CosmosSDKService, private configService: ConfigService, + private cosmosRest: CosmosRestService, ) { this.txTypeOptions$ = this.configService.config$.pipe( map((config) => config?.extension?.messageModules), ); const timer$ = timer(0, this.pollingInterval * 1000); - const sdk$ = timer$.pipe(mergeMap((_) => this.cosmosSDK.sdk$)); this.selectedTxType$ = combineLatest([this.txTypeOptions$, this.route.queryParams]).pipe( map(([options, params]) => @@ -58,25 +56,11 @@ export class TxsComponent implements OnInit { map((txType) => txType), ); - this.txsTotalCount$ = combineLatest([sdk$, this.selectedTxTypeChanged$]).pipe( - switchMap(([sdk, selectedTxType]) => { - return cosmosclient.rest.tx - .getTxsEvent( - sdk.rest, - [`message.module='${selectedTxType}'`], - undefined, - undefined, - undefined, - true, - ) - .then((res) => - res.data.pagination?.total ? BigInt(res.data.pagination?.total) : BigInt(0), - ) - .catch((error) => { - console.error(error); - return BigInt(0); - }); - }), + this.txsTotalCount$ = timer$.pipe( + withLatestFrom(this.selectedTxType$), + switchMap(([_, selectedTxType]) => this.cosmosRest.getSelectedTxTypeEvent$(selectedTxType)), + map((res) => res.pagination?.total), + map((total) => (total ? BigInt(total) : BigInt(0))), ); this.pageLength$ = this.txsTotalCount$.pipe( @@ -107,8 +91,8 @@ export class TxsComponent implements OnInit { ); this.txs$ = this.paginationInfoChanged$.pipe( - withLatestFrom(sdk$, this.selectedTxType$, this.txsTotalCount$), - mergeMap(([paginationInfo, sdk, selectedTxType, txsTotalCount]) => { + withLatestFrom(timer$, this.selectedTxType$, this.txsTotalCount$), + mergeMap(([paginationInfo, _, selectedTxType, txsTotalCount]) => { const pageOffset = txsTotalCount - BigInt(paginationInfo.pageSize) * BigInt(paginationInfo.pageNumber); const modifiedPageOffset = pageOffset < 1 ? BigInt(1) : pageOffset; @@ -119,8 +103,8 @@ export class TxsComponent implements OnInit { // Note: This is strange. This is temporary workaround way. const temporaryWorkaroundPageSize = txsTotalCount === BigInt(1) && - modifiedPageOffset === BigInt(1) && - modifiedPageSize === BigInt(1) + modifiedPageOffset === BigInt(1) && + modifiedPageSize === BigInt(1) ? modifiedPageSize + BigInt(1) : modifiedPageSize; @@ -128,26 +112,18 @@ export class TxsComponent implements OnInit { return []; } - return cosmosclient.rest.tx - .getTxsEvent( - sdk.rest, - [`message.module='${selectedTxType}'`], - undefined, - modifiedPageOffset, - temporaryWorkaroundPageSize, - true, - ) - .then((res) => res.data.tx_responses) - .catch((error) => { - console.error(error); - return []; - }); + return this.cosmosRest.getSelectedTxTypeEvent$( + selectedTxType, + modifiedPageOffset, + temporaryWorkaroundPageSize, + ); }), + map((res) => res.tx_responses), map((latestTxs) => latestTxs?.reverse()), ); } - ngOnInit(): void { } + ngOnInit(): void {} appSelectedTxTypeChanged(selectedTxType: string): void { this.router.navigate([], { From f7990e8d3fb732db43fced5155f9fef4f5a2deb0 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Thu, 7 Jul 2022 15:25:31 +0900 Subject: [PATCH 70/77] fix: split rest from proposals --- .../src/app/models/cosmos-rest.service.ts | 68 ++++++++++++++- .../proposals/proposal/proposal.component.ts | 84 ++++--------------- .../vote/proposals/proposals.component.ts | 30 ++----- 3 files changed, 93 insertions(+), 89 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index 67f86ddf3..9b039accd 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -13,7 +13,13 @@ import { InlineResponse20010, InlineResponse20012 as InlineResponse, InlineResponse20022, - InlineResponse20027Proposals, + InlineResponse20026DepositParams as DepositParams, + InlineResponse20026TallyParams as TallyParams, + InlineResponse20026VotingParams as VotingParams, + InlineResponse20027FinalTallyResult as TallyResult, + InlineResponse20027Proposals as Proposals, + InlineResponse20029Deposits as Deposits, + InlineResponse20032Votes as Votes, InlineResponse20038, InlineResponse2003Balances as InlineResponseBalances, InlineResponse20041, @@ -54,6 +60,7 @@ export class CosmosRestService { map((res) => res.data), ); } + getTx$(hash: string): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.tx.getTx(sdk, hash)), @@ -220,7 +227,15 @@ export class CosmosRestService { ); } - getProposal$(proposalId: string): Observable { + getProposals$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.gov.proposals(sdk)), + map((res) => res.data.proposals), + catchError(this._handleError), + ); + } + + getProposal$(proposalId: string): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.gov.proposal(sdk, proposalId)), map((res) => res.data.proposal), @@ -228,12 +243,61 @@ export class CosmosRestService { ); } + getVotingParams$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.gov.params(sdk, 'voting')), + map((res) => res.data.voting_params), + catchError(this._handleError), + ); + } + + getTallyParams$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.gov.params(sdk, 'tally')), + map((res) => res.data.tally_params), + catchError(this._handleError), + ); + } + + getDepositParams$(): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.gov.params(sdk, 'deposit')), + map((res) => res.data.deposit_params), + catchError(this._handleError), + ); + } + + getDeposits$(proposalId: string): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.gov.deposits(sdk, proposalId)), + map((res) => res.data.deposits), + catchError(this._handleError), + ); + } + + getVotes$(proposalId: string): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.gov.votes(sdk, proposalId)), + map((res) => res.data.votes), + catchError(this._handleError), + ); + } + + getTallyResult$(proposalId: string): Observable { + return this.restSdk$.pipe( + mergeMap((sdk) => cosmosclient.rest.gov.tallyresult(sdk, proposalId)), + map((res) => res.data.tally), + catchError(this._handleError), + ); + } + getAnnualProvisions$(): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.mint.annualProvisions(sdk)), map((res) => res.data), ); } + getInflation$(): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.mint.inflation(sdk)), diff --git a/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts b/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts index 2412528a6..535a4c3df 100644 --- a/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts +++ b/projects/portal/src/app/pages/vote/proposals/proposal/proposal.component.ts @@ -1,19 +1,18 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import cosmosclient from '@cosmos-client/core'; import { - InlineResponse20027Proposals, - InlineResponse20029Deposits, - InlineResponse20027FinalTallyResult, - InlineResponse20032Votes, InlineResponse20026DepositParams, InlineResponse20026TallyParams, InlineResponse20026VotingParams, + InlineResponse20027FinalTallyResult, + InlineResponse20027Proposals, + InlineResponse20029Deposits, + InlineResponse20032Votes, } from '@cosmos-client/core/esm/openapi'; -import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; +import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { GovApplicationService } from 'projects/portal/src/app/models/cosmos/gov.application.service'; -import { combineLatest, Observable, of } from 'rxjs'; -import { catchError, map, mergeMap } from 'rxjs/operators'; +import { Observable } from 'rxjs'; +import { map, mergeMap } from 'rxjs/operators'; @Component({ selector: 'app-proposal', @@ -32,20 +31,12 @@ export class ProposalComponent implements OnInit { constructor( private route: ActivatedRoute, - private cosmosSDK: CosmosSDKService, private readonly govAppService: GovApplicationService, + private readonly cosmosRest: CosmosRestService, ) { - const proposalID$ = this.route.params.pipe(map((params) => params.id)); + const proposalID$ = this.route.params.pipe(map((params) => params.id as string)); - const combined$ = combineLatest([this.cosmosSDK.sdk$, proposalID$]); - this.proposal$ = combined$.pipe( - mergeMap(([sdk, id]) => cosmosclient.rest.gov.proposal(sdk.rest, id)), - map((result) => result.data.proposal!), - catchError((error) => { - console.error(error); - return of(undefined); - }), - ); + this.proposal$ = proposalID$.pipe(mergeMap((id) => this.cosmosRest.getProposal$(id))); this.proposalType$ = this.proposal$.pipe( map((proposal) => { @@ -55,58 +46,19 @@ export class ProposalComponent implements OnInit { }), ); - this.deposits$ = combined$.pipe( - mergeMap(([sdk, proposalID]) => cosmosclient.rest.gov.deposits(sdk.rest, proposalID)), - map((result) => result.data.deposits!), - catchError((error) => { - console.error(error); - return of(undefined); - }), - ); + this.deposits$ = proposalID$.pipe(mergeMap((id) => this.cosmosRest.getDeposits$(id))); + this.depositParams$ = this.cosmosRest.getDepositParams$(); - this.depositParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.gov.params(sdk.rest, 'deposit')), - map((result) => result.data.deposit_params), + this.tally$ = proposalID$.pipe( + mergeMap((proposalId) => this.cosmosRest.getTallyResult$(proposalId)), ); + this.tallyParams$ = this.cosmosRest.getTallyParams$(); - this.tally$ = combined$.pipe( - mergeMap(([sdk, proposalID]) => cosmosclient.rest.gov.tallyresult(sdk.rest, proposalID)), - map((result) => result.data.tally!), - catchError((error) => { - console.error(error); - return of(undefined); - }), - ); - - this.tallyParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.gov.params(sdk.rest, 'tallying')), - map((result) => result.data.tally_params), - catchError((error) => { - console.error(error); - return of(undefined); - }), - ); - - this.votes$ = combined$.pipe( - mergeMap(([sdk, proposalID]) => cosmosclient.rest.gov.votes(sdk.rest, proposalID)), - map((result) => result.data.votes!), - catchError((error) => { - console.error(error); - return of(undefined); - }), - ); - - this.votingParams$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.gov.params(sdk.rest, 'voting')), - map((result) => result.data.voting_params), - catchError((error) => { - console.error(error); - return of(undefined); - }), - ); + this.votes$ = proposalID$.pipe(mergeMap((proposalId) => this.cosmosRest.getVotes$(proposalId))); + this.votingParams$ = this.cosmosRest.getVotingParams$(); } - ngOnInit(): void { } + ngOnInit(): void {} onVoteProposal(proposalID: number) { this.govAppService.openVoteFormDialog(proposalID); diff --git a/projects/portal/src/app/pages/vote/proposals/proposals.component.ts b/projects/portal/src/app/pages/vote/proposals/proposals.component.ts index 0d008ee97..ab7bc45df 100644 --- a/projects/portal/src/app/pages/vote/proposals/proposals.component.ts +++ b/projects/portal/src/app/pages/vote/proposals/proposals.component.ts @@ -1,13 +1,11 @@ +import { CosmosRestService } from '../../../models/cosmos-rest.service'; import { GovApplicationService } from '../../../models/cosmos/gov.application.service'; import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import cosmosclient from '@cosmos-client/core'; import { InlineResponse20027FinalTallyResult, InlineResponse20027Proposals, } from '@cosmos-client/core/esm/openapi/api'; -import { CosmosSDKService } from 'projects/explorer/src/app/models/cosmos-sdk.service'; -import { combineLatest, Observable, of } from 'rxjs'; +import { combineLatest, Observable } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @Component({ @@ -20,30 +18,20 @@ export class ProposalsComponent implements OnInit { tallies$: Observable<(InlineResponse20027FinalTallyResult | undefined)[]>; constructor( - private readonly route: ActivatedRoute, - private readonly cosmosSDK: CosmosSDKService, private readonly govAppService: GovApplicationService, + private readonly cosmosRest: CosmosRestService, ) { - this.proposals$ = this.cosmosSDK.sdk$.pipe( - mergeMap((sdk) => cosmosclient.rest.gov.proposals(sdk.rest)), - map((result) => result.data.proposals!), - ); - this.tallies$ = combineLatest([this.cosmosSDK.sdk$, this.proposals$]).pipe( - mergeMap(([sdk, proposals]) => - Promise.all( - proposals.map((proposal) => - cosmosclient.rest.gov.tallyresult(sdk.rest, proposal.proposal_id!).catch((err) => { - console.log(err); - return; - }), - ), + this.proposals$ = this.cosmosRest.getProposals$().pipe(map((res) => res!)); + this.tallies$ = this.proposals$.pipe( + mergeMap((proposals) => + combineLatest( + proposals.map((proposal) => this.cosmosRest.getTallyResult$(proposal.proposal_id!)), ), ), - map((result) => result.map((res) => (res ? res.data.tally! : undefined))), ); } - ngOnInit(): void { } + ngOnInit(): void {} onVoteProposal(proposalID: number) { this.govAppService.openVoteFormDialog(proposalID); From 013541473f51335bd85e72b460cc1fc3c6c5bbd3 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Thu, 7 Jul 2022 15:53:37 +0900 Subject: [PATCH 71/77] fix: small fix --- projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.html b/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.html index 43311783d..ccd17cd2b 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.html +++ b/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.html @@ -2,7 +2,7 @@ [owner]="owner$ | async" [collateralType]="collateralType$ | async" [denom]="denom$ | async" - [params]="params$ | async" + [params]="cdpParams$ | async" [cdp]="cdp$ | async" [deposits]="deposits$ | async" [spotPrice]="spotPrice$ | async" From 6893fdde069d12a2ff634e0c5928f8cfd8cb77f4 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Thu, 7 Jul 2022 16:23:53 +0900 Subject: [PATCH 72/77] fix: rename, coordination of responsibilities --- .../src/app/models/cosmos-rest.service.ts | 41 +++++++++---------- .../accounts/account/account.component.ts | 4 ++ .../pages/balance/balance.usecase.service.ts | 16 +++++--- 3 files changed, 34 insertions(+), 27 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index 9b039accd..1d4782a7f 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -10,9 +10,9 @@ import { CosmosMintV1beta1QueryInflationResponse as InflationResponse, CosmosTxV1beta1GetTxResponse as TxResponse, CosmosTxV1beta1GetTxsEventResponse as TxsEventResponse, - InlineResponse20010, - InlineResponse20012 as InlineResponse, - InlineResponse20022, + InlineResponse20010 as BlockResponse, + InlineResponse20012 as NodeInfoResponse, + InlineResponse20022 as RewardsResponse, InlineResponse20026DepositParams as DepositParams, InlineResponse20026TallyParams as TallyParams, InlineResponse20026VotingParams as VotingParams, @@ -20,11 +20,12 @@ import { InlineResponse20027Proposals as Proposals, InlineResponse20029Deposits as Deposits, InlineResponse20032Votes as Votes, - InlineResponse20038, - InlineResponse2003Balances as InlineResponseBalances, - InlineResponse20041, + InlineResponse20038 as DelegatorDelegationsResponse, + InlineResponse2003Balances as Balances, + InlineResponse20041 as DelegatorValidatorsResponse, InlineResponse20041Validators as Validators, - InlineResponse20047, + InlineResponse20047 as UnboundingDelegationResponse, + InlineResponse200Accounts as Accounts, QueryTotalSupplyResponseIsTheResponseTypeForTheQueryTotalSupplyRPCMethod as TotalSupplyResponse, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod as ValidatorCommissionResponse, QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod as ValidatorsResponse, @@ -40,7 +41,7 @@ export class CosmosRestService { this.restSdk$ = this.cosmosSDK.sdk$.pipe(pluck('rest')); } - getNodeInfo$(): Observable { + getNodeInfo$(): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.tendermint.getNodeInfo(sdk)), map((res) => res.data), @@ -54,7 +55,7 @@ export class CosmosRestService { ); } - getLatestBlock$(): Observable { + getLatestBlock$(): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.tendermint.getLatestBlock(sdk)), map((res) => res.data), @@ -68,9 +69,7 @@ export class CosmosRestService { ); } - allBalances$( - cosmosAccAddress: cosmosclient.AccAddress, - ): Observable { + allBalances$(cosmosAccAddress: cosmosclient.AccAddress): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.bank.allBalances(sdk, cosmosAccAddress)), map((res) => res.data.balances), @@ -85,15 +84,11 @@ export class CosmosRestService { ); } - getAccount$(cosmosAccAddress: cosmosclient.AccAddress): Observable { + getAccount$(cosmosAccAddress: cosmosclient.AccAddress): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.auth.account(sdk, cosmosAccAddress)), tap((res) => console.log(res.data.account)), map((res) => res.data.account), - map((account) => { - const { protoJSONToInstance, castProtoJSONOfProtoAny } = cosmosclient.codec; - return (account && protoJSONToInstance(castProtoJSONOfProtoAny(account))) as InlineResponse; - }), catchError(this._handleError), ); } @@ -145,14 +140,18 @@ export class CosmosRestService { ); } - getDelegatorDelegations$(address: cosmosclient.AccAddress): Observable { + getDelegatorDelegations$( + address: cosmosclient.AccAddress, + ): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.staking.delegatorDelegations(sdk, address)), map((res) => res.data), ); } - getDelegatorValidators$(address: cosmosclient.AccAddress): Observable { + getDelegatorValidators$( + address: cosmosclient.AccAddress, + ): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.staking.delegatorValidators(sdk, address)), map((res) => res.data), @@ -162,7 +161,7 @@ export class CosmosRestService { getUnbondingDelegation$( validatorAddr: cosmosclient.ValAddress, delegatorAddr: cosmosclient.AccAddress, - ): Observable { + ): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.staking.unbondingDelegation(sdk, validatorAddr, delegatorAddr), @@ -198,7 +197,7 @@ export class CosmosRestService { getValidatorOutstandingRewards$( valAddress: cosmosclient.ValAddress, - ): Observable { + ): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.distribution.validatorOutstandingRewards(sdk, valAddress), diff --git a/projects/portal/src/app/pages/accounts/account/account.component.ts b/projects/portal/src/app/pages/accounts/account/account.component.ts index 5f092c38e..74ac75478 100644 --- a/projects/portal/src/app/pages/accounts/account/account.component.ts +++ b/projects/portal/src/app/pages/accounts/account/account.component.ts @@ -46,6 +46,10 @@ export class AccountComponent implements OnInit { } return this.cosmosRest.getAccount$(address); }), + map((account) => { + const { protoJSONToInstance, castProtoJSONOfProtoAny } = cosmosclient.codec; + return account && protoJSONToInstance(castProtoJSONOfProtoAny(account)); + }), ); this.balances$ = this.address$.pipe( mergeMap((address) => { diff --git a/projects/portal/src/app/pages/balance/balance.usecase.service.ts b/projects/portal/src/app/pages/balance/balance.usecase.service.ts index 1345504b6..245178404 100644 --- a/projects/portal/src/app/pages/balance/balance.usecase.service.ts +++ b/projects/portal/src/app/pages/balance/balance.usecase.service.ts @@ -65,6 +65,10 @@ export class BalanceUsecaseService { } return this.rest.getAccount$(cosmosAccAddress); }), + map((account) => { + const { protoJSONToInstance, castProtoJSONOfProtoAny } = cosmosclient.codec; + return account && protoJSONToInstance(castProtoJSONOfProtoAny(account)); + }), map((cosmosUnknownAccount) => convertUnknownAccountToTypedAccount(cosmosUnknownAccount)), map((cosmosAccount) => convertTypedAccountToTypedName(cosmosAccount)), ); @@ -81,12 +85,12 @@ export class BalanceUsecaseService { } get faucets$(): Observable< | { - hasFaucet: boolean; - faucetURL: string; - denom: string; - creditAmount: number; - maxCredit: number; - }[] + hasFaucet: boolean; + faucetURL: string; + denom: string; + creditAmount: number; + maxCredit: number; + }[] | undefined > { return combineLatest([this.config$, this.balances$]).pipe( From 8e7e8cb49229aa1145485199754a16176f8a030b Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Thu, 7 Jul 2022 16:48:16 +0900 Subject: [PATCH 73/77] fix: rename --- projects/portal/src/app/models/cosmos-rest.service.ts | 2 +- .../src/app/pages/accounts/account/account.component.ts | 2 +- .../portal/src/app/pages/balance/balance.usecase.service.ts | 2 +- .../portal/src/app/pages/cosmos/bank/send/send.component.ts | 2 +- .../delegate-form-dialog/delegate-form-dialog.component.ts | 2 +- .../redelegate-form-dialog.component.ts | 2 +- .../undelegate-form-dialog.component.ts | 2 +- .../deposit-form-dialog/deposit-form-dialog.component.ts | 2 +- .../vote/vote-form-dialog/vote-form-dialog.component.ts | 2 +- .../src/app/pages/home/accounts/accounts.component.ts | 6 +++--- projects/portal/src/app/pages/keys/key/key.component.ts | 2 +- .../src/app/pages/mint/cdps/cdp/clear/clear.component.ts | 2 +- .../app/pages/mint/cdps/cdp/deposit/deposit.component.ts | 2 +- .../src/app/pages/mint/cdps/cdp/issue/issue.component.ts | 2 +- .../app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts | 2 +- .../src/app/pages/mint/cdps/create/create.component.ts | 2 +- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index 1d4782a7f..3c604954b 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -69,7 +69,7 @@ export class CosmosRestService { ); } - allBalances$(cosmosAccAddress: cosmosclient.AccAddress): Observable { + getAllBalances$(cosmosAccAddress: cosmosclient.AccAddress): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.bank.allBalances(sdk, cosmosAccAddress)), map((res) => res.data.balances), diff --git a/projects/portal/src/app/pages/accounts/account/account.component.ts b/projects/portal/src/app/pages/accounts/account/account.component.ts index 74ac75478..9439da1fa 100644 --- a/projects/portal/src/app/pages/accounts/account/account.component.ts +++ b/projects/portal/src/app/pages/accounts/account/account.component.ts @@ -56,7 +56,7 @@ export class AccountComponent implements OnInit { if (address === undefined) { return of([]); } - return this.cosmosRest.allBalances$(address).pipe(map((balances) => balances || [])); + return this.cosmosRest.getAllBalances$(address).pipe(map((balances) => balances || [])); }), ); } diff --git a/projects/portal/src/app/pages/balance/balance.usecase.service.ts b/projects/portal/src/app/pages/balance/balance.usecase.service.ts index 245178404..8c9533e54 100644 --- a/projects/portal/src/app/pages/balance/balance.usecase.service.ts +++ b/projects/portal/src/app/pages/balance/balance.usecase.service.ts @@ -79,7 +79,7 @@ export class BalanceUsecaseService { if (!cosmosAccAddress) { return of(cosmosAccAddress); } - return this.rest.allBalances$(cosmosAccAddress); + return this.rest.getAllBalances$(cosmosAccAddress); }), ); } diff --git a/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts b/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts index 25150a345..8acef5483 100644 --- a/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts +++ b/projects/portal/src/app/pages/cosmos/bank/send/send.component.ts @@ -35,7 +35,7 @@ export class SendComponent implements OnInit { map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.getAllBalances$(address))); this.amount$ = this.coins$.pipe( map((amount) => diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts index c65973820..e8f7f4c9a 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts @@ -44,7 +44,7 @@ export class DelegateFormDialogComponent implements OnInit { filter((wallet): wallet is StoredWallet => wallet !== undefined && wallet !== null), map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.getAllBalances$(address))); this.uguuBalance$ = this.coins$.pipe( map((coins) => { const balance = coins?.find((coin) => coin.denom == 'uguu'); diff --git a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index 6d8f5667c..6ffd402f3 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -62,7 +62,7 @@ export class RedelegateFormDialogComponent implements OnInit { )?.balance, ), ); - this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.getAllBalances$(address))); this.uguuBalance$ = this.coins$.pipe( map((coins) => { const balance = coins?.find((coin) => coin.denom == 'uguu'); diff --git a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts index 2dbc89fa4..cf6b37223 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/undelegate-form-dialog/undelegate-form-dialog.component.ts @@ -68,7 +68,7 @@ export class UndelegateFormDialogComponent implements OnInit { )?.balance, ), ); - this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.getAllBalances$(address))); this.uguuBalance$ = this.coins$.pipe( map((coins) => { const balance = coins?.find((coin) => coin.denom == 'uguu'); diff --git a/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts index 1c18eda15..d215138bd 100644 --- a/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/vote/deposit-form-dialog/deposit-form-dialog.component.ts @@ -40,7 +40,7 @@ export class DepositFormDialogComponent implements OnInit { filter((wallet): wallet is StoredWallet => wallet !== undefined && wallet !== null), map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.getAllBalances$(address))); this.uguuBalance$ = this.coins$.pipe( map((coins) => { const balance = coins?.find((coin) => coin.denom == 'uguu'); diff --git a/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts index ab853dac7..326c53afa 100644 --- a/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/vote/vote-form-dialog/vote-form-dialog.component.ts @@ -41,7 +41,7 @@ export class VoteFormDialogComponent implements OnInit { map((wallet) => cosmosclient.AccAddress.fromString(wallet.address)), ); - this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.allBalances$(address))); + this.coins$ = address$.pipe(mergeMap((address) => this.cosmosRest.getAllBalances$(address))); this.uguuBalance$ = this.coins$.pipe( map((coins) => { diff --git a/projects/portal/src/app/pages/home/accounts/accounts.component.ts b/projects/portal/src/app/pages/home/accounts/accounts.component.ts index d91101aef..1017f8d6c 100644 --- a/projects/portal/src/app/pages/home/accounts/accounts.component.ts +++ b/projects/portal/src/app/pages/home/accounts/accounts.component.ts @@ -33,7 +33,7 @@ export class AccountsComponent implements OnInit { if (addresses === undefined || addresses.length === 0) { return []; } - return this.cosmosRest.allBalances$(addresses[0]).pipe(map((res) => res || [])); + return this.cosmosRest.getAllBalances$(addresses[0]).pipe(map((res) => res || [])); }), ); @@ -42,7 +42,7 @@ export class AccountsComponent implements OnInit { if (addresses === undefined || addresses[1] === undefined) { return []; } - return this.cosmosRest.allBalances$(addresses[1]).pipe(map((res) => res || [])); + return this.cosmosRest.getAllBalances$(addresses[1]).pipe(map((res) => res || [])); }), ); @@ -51,7 +51,7 @@ export class AccountsComponent implements OnInit { if (addresses === undefined || addresses[2] === undefined) { return []; } - return this.cosmosRest.allBalances$(addresses[2]).pipe(map((res) => res || [])); + return this.cosmosRest.getAllBalances$(addresses[2]).pipe(map((res) => res || [])); }), ); } diff --git a/projects/portal/src/app/pages/keys/key/key.component.ts b/projects/portal/src/app/pages/keys/key/key.component.ts index 21e547426..f02a88d41 100644 --- a/projects/portal/src/app/pages/keys/key/key.component.ts +++ b/projects/portal/src/app/pages/keys/key/key.component.ts @@ -52,7 +52,7 @@ export class KeyComponent implements OnInit { if (address === undefined) { return of([]); } - return this.cosmosRest.allBalances$(address).pipe(map((res) => res || [])); + return this.cosmosRest.getAllBalances$(address).pipe(map((res) => res || [])); }), ); diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts index 8b1ba161c..3837720de 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts @@ -64,7 +64,7 @@ export class ClearComponent implements OnInit { if (address === undefined) { return of([]); } - return this.cosmosRest.allBalances$(address).pipe(map((res) => res || [])); + return this.cosmosRest.getAllBalances$(address).pipe(map((res) => res || [])); }), ); diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts index c086d1c54..52de0a086 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts @@ -60,7 +60,7 @@ export class DepositComponent implements OnInit { if (address === undefined) { return of([]); } - return this.cosmosRest.allBalances$(address); + return this.cosmosRest.getAllBalances$(address); }), ); diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts index 4df0ee6b4..c3f4a48c1 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts @@ -70,7 +70,7 @@ export class IssueComponent implements OnInit { if (address === undefined) { return of([]); } - return this.cosmosRest.allBalances$(address); + return this.cosmosRest.getAllBalances$(address); }), ); diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts index 1280c0df9..cee3d47db 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts @@ -78,7 +78,7 @@ export class WithdrawComponent implements OnInit { if (address === undefined) { return of([]); } - return this.cosmosRest.allBalances$(address); + return this.cosmosRest.getAllBalances$(address); }), ); diff --git a/projects/portal/src/app/pages/mint/cdps/create/create.component.ts b/projects/portal/src/app/pages/mint/cdps/create/create.component.ts index 68f48f1e1..590ef754f 100644 --- a/projects/portal/src/app/pages/mint/cdps/create/create.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/create/create.component.ts @@ -99,7 +99,7 @@ export class CreateComponent implements OnInit { if (address === undefined) { return of([]); } - return this.cosmosRest.allBalances$(address); + return this.cosmosRest.getAllBalances$(address); }), ); From 8b7c51623739d398be8433350d01bb26f8bfc1f7 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Thu, 7 Jul 2022 17:26:32 +0900 Subject: [PATCH 74/77] fix: small fix --- .../pages/accounts/account/account.component.ts | 3 ++- .../auction/place-bid/place-bid.component.ts | 2 +- .../pages/auction/auctions/auctions.component.ts | 15 ++++++--------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/projects/portal/src/app/pages/accounts/account/account.component.ts b/projects/portal/src/app/pages/accounts/account/account.component.ts index 9439da1fa..a9263f65a 100644 --- a/projects/portal/src/app/pages/accounts/account/account.component.ts +++ b/projects/portal/src/app/pages/accounts/account/account.component.ts @@ -56,8 +56,9 @@ export class AccountComponent implements OnInit { if (address === undefined) { return of([]); } - return this.cosmosRest.getAllBalances$(address).pipe(map((balances) => balances || [])); + return this.cosmosRest.getAllBalances$(address); }), + map((balances) => balances || []), ); } diff --git a/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts b/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts index da49bc3d3..1478ec8ea 100644 --- a/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auction/place-bid/place-bid.component.ts @@ -34,7 +34,7 @@ export class PlaceBidComponent implements OnInit { this.key$ = this.keyStore.currentKey$.asObservable(); this.auctionID$ = this.route.params.pipe(map((params) => params.auction_id)); this.auction$ = this.auctionID$.pipe( - mergeMap(([id]) => this.ununifiRest.getAuction$(id)), + mergeMap((id) => this.ununifiRest.getAuction$(id)), map((auction) => { const anyAuction = auction as { base_auction: { end_time: string; max_end_time: string }; diff --git a/projects/portal/src/app/pages/auction/auctions/auctions.component.ts b/projects/portal/src/app/pages/auction/auctions/auctions.component.ts index e7b0c5cb5..bc73a8182 100644 --- a/projects/portal/src/app/pages/auction/auctions/auctions.component.ts +++ b/projects/portal/src/app/pages/auction/auctions/auctions.component.ts @@ -53,12 +53,13 @@ export class AuctionsComponent implements OnInit { ); this.auctions$ = combineLatest([ + timer$, this.pageSize$.asObservable(), this.auctionsPageOffset$, this.auctionsTotalCount$, ]).pipe( - filter(([_pageSize, _pageOffset, auctionTotalCount]) => auctionTotalCount !== BigInt(0)), - switchMap(([pageSize, pageOffset]) => { + filter(([_, _pageSize, _pageOffset, auctionTotalCount]) => auctionTotalCount !== BigInt(0)), + switchMap(([_, pageSize, pageOffset]) => { const modifiedPageOffset = pageOffset < 0 ? BigInt(0) : pageOffset; const modifiedPageSize = pageOffset < 0 ? pageOffset + BigInt(pageSize) : BigInt(pageSize); @@ -66,13 +67,9 @@ export class AuctionsComponent implements OnInit { return []; } - return timer$.pipe( - mergeMap(() => - this.ununifiRest - .getAllAuctions$(modifiedPageOffset, modifiedPageSize) - .pipe(map((res) => res.auctions)), - ), - ); + return this.ununifiRest + .getAllAuctions$(modifiedPageOffset, modifiedPageSize) + .pipe(map((res) => res.auctions)); }), map((latestAuctions) => { const unpackAuction = latestAuctions?.map((auction) => { From ec000609d1724850f7223afa2dd845fcd160c0f4 Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Thu, 7 Jul 2022 17:27:04 +0900 Subject: [PATCH 75/77] fix: change return type (validator) --- .../portal/src/app/models/cosmos-rest.service.ts | 5 ++--- .../staking/validators/validators.component.ts | 4 ++-- .../validators/validator/validator.component.ts | 12 +++++------- .../delegate/validators/validators.component.ts | 2 +- .../delegate-form-dialog.component.ts | 2 +- .../redelegate-form-dialog.component.ts | 2 +- .../staking/validators/validators.component.html | 4 ++-- .../staking/validators/validators.component.ts | 9 +++------ 8 files changed, 17 insertions(+), 23 deletions(-) diff --git a/projects/portal/src/app/models/cosmos-rest.service.ts b/projects/portal/src/app/models/cosmos-rest.service.ts index 3c604954b..4ee8ab3fc 100644 --- a/projects/portal/src/app/models/cosmos-rest.service.ts +++ b/projects/portal/src/app/models/cosmos-rest.service.ts @@ -28,7 +28,6 @@ import { InlineResponse200Accounts as Accounts, QueryTotalSupplyResponseIsTheResponseTypeForTheQueryTotalSupplyRPCMethod as TotalSupplyResponse, QueryValidatorCommissionResponseIsTheResponseTypeForTheQueryValidatorCommissionRPCMethod as ValidatorCommissionResponse, - QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod as ValidatorsResponse, } from '@cosmos-client/core/esm/openapi'; import { Observable, of } from 'rxjs'; import { catchError, map, mergeMap, pluck, tap } from 'rxjs/operators'; @@ -170,10 +169,10 @@ export class CosmosRestService { ); } - getValidators$(): Observable { + getValidators$(): Observable { return this.restSdk$.pipe( mergeMap((sdk) => cosmosclient.rest.staking.validators(sdk)), - map((res) => res.data), + map((res) => res.data.validators), ); } diff --git a/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts b/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts index b95c959ab..74ec340c2 100644 --- a/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts +++ b/projects/portal/src/app/pages/cosmos/staking/validators/validators.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod } from '@cosmos-client/core/esm/openapi'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { Observable } from 'rxjs'; @@ -9,7 +9,7 @@ import { Observable } from 'rxjs'; styleUrls: ['./validators.component.css'], }) export class ValidatorsComponent implements OnInit { - validators$: Observable; + validators$: Observable; constructor(private cosmosRest: CosmosRestService) { this.validators$ = this.cosmosRest.getValidators$(); diff --git a/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts b/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts index fde0efb25..4a79f9a42 100644 --- a/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts +++ b/projects/portal/src/app/pages/delegate/validators/validator/validator.component.ts @@ -1,7 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import cosmosclient from '@cosmos-client/core'; -import { QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod } from '@cosmos-client/core/esm/openapi'; import { CosmosRestService } from 'projects/portal/src/app/models/cosmos-rest.service'; import { validatorType } from 'projects/portal/src/app/views/delegate/validators/validators.component'; import { combineLatest, Observable } from 'rxjs'; @@ -13,7 +12,6 @@ import { map, withLatestFrom } from 'rxjs/operators'; styleUrls: ['./validator.component.css'], }) export class ValidatorComponent implements OnInit { - validatorsList$: Observable; allValidatorsTokens$: Observable; OtherValidators$: Observable; validator$: Observable; @@ -29,25 +27,25 @@ export class ValidatorComponent implements OnInit { map((validatorAddress) => validatorAddress.toAccAddress()), ); - this.validatorsList$ = this.cosmosRest.getValidators$(); + const validatorsList$ = this.cosmosRest.getValidators$(); - this.allValidatorsTokens$ = this.validatorsList$.pipe( + this.allValidatorsTokens$ = validatorsList$.pipe( map((validators) => - validators?.validators?.reduce((sum, validator) => { + validators?.reduce((sum, validator) => { return sum + Number(validator.tokens); }, 0), ), ); this.OtherValidators$ = this.allValidatorsTokens$.pipe( - withLatestFrom(this.validatorsList$), + withLatestFrom(validatorsList$), map(([allTokens, validators]) => { if (!allTokens) { return []; } // sort by share (Token) - const validatorsWithSorted = validators.validators?.sort( + const validatorsWithSorted = validators?.sort( (x, y) => Number(y.tokens) - Number(x.tokens), ); diff --git a/projects/portal/src/app/pages/delegate/validators/validators.component.ts b/projects/portal/src/app/pages/delegate/validators/validators.component.ts index 2a2fd5842..252c689be 100644 --- a/projects/portal/src/app/pages/delegate/validators/validators.component.ts +++ b/projects/portal/src/app/pages/delegate/validators/validators.component.ts @@ -40,7 +40,7 @@ export class ValidatorsComponent implements OnInit { private readonly stakingAppService: StakingApplicationService, private cosmosRest: CosmosRestService, ) { - this.validatorsList$ = this.cosmosRest.getValidators$().pipe(map((res) => res.validators)); + this.validatorsList$ = this.cosmosRest.getValidators$(); this.allValidatorsTokens$ = this.validatorsList$.pipe( map((validators) => diff --git a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts index e8f7f4c9a..96d1b8787 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/delegate-form-dialog/delegate-form-dialog.component.ts @@ -38,7 +38,7 @@ export class DelegateFormDialogComponent implements OnInit { private readonly cosmosRest: CosmosRestService, ) { this.validator = data; - this.validatorsList$ = this.cosmosRest.getValidators$().pipe(map((res) => res.validators)); + this.validatorsList$ = this.cosmosRest.getValidators$(); this.currentStoredWallet$ = this.walletService.currentStoredWallet$; const address$ = this.currentStoredWallet$.pipe( filter((wallet): wallet is StoredWallet => wallet !== undefined && wallet !== null), diff --git a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts index 6ffd402f3..755634b6c 100644 --- a/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts +++ b/projects/portal/src/app/pages/dialogs/delegate/redelegate-form-dialog/redelegate-form-dialog.component.ts @@ -43,7 +43,7 @@ export class RedelegateFormDialogComponent implements OnInit { private readonly cosmosRest: CosmosRestService, ) { this.validator = data; - this.validatorsList$ = this.cosmosRest.getValidators$().pipe(map((res) => res.validators)); + this.validatorsList$ = this.cosmosRest.getValidators$(); this.currentStoredWallet$ = this.walletService.currentStoredWallet$; const address$ = this.currentStoredWallet$.pipe( filter((wallet): wallet is StoredWallet => wallet !== undefined && wallet !== null), diff --git a/projects/portal/src/app/views/cosmos/staking/validators/validators.component.html b/projects/portal/src/app/views/cosmos/staking/validators/validators.component.html index 01ce5fca9..037c90f85 100644 --- a/projects/portal/src/app/views/cosmos/staking/validators/validators.component.html +++ b/projects/portal/src/app/views/cosmos/staking/validators/validators.component.html @@ -6,10 +6,10 @@

Validators

- + - + circle {{ validator.operator_address }} diff --git a/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts b/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts index 951eb87f8..19fa4db75 100644 --- a/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts +++ b/projects/portal/src/app/views/cosmos/staking/validators/validators.component.ts @@ -1,8 +1,5 @@ -import { Component, OnInit, Input } from '@angular/core'; -import { - InlineResponse20041Validators, - QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod, -} from '@cosmos-client/core/esm/openapi'; +import { Component, Input, OnInit } from '@angular/core'; +import { InlineResponse20041Validators } from '@cosmos-client/core/esm/openapi'; import * as crypto from 'crypto'; @Component({ @@ -12,7 +9,7 @@ import * as crypto from 'crypto'; }) export class ValidatorsComponent implements OnInit { @Input() - validators?: QueryValidatorsResponseIsResponseTypeForTheQueryValidatorsRPCMethod | null; + validators?: InlineResponse20041Validators[] | null; constructor() {} From 42885701a19b18735d296de85910588d58551d7b Mon Sep 17 00:00:00 2001 From: yutaro_elk <36399275+yutaro-elk@users.noreply.github.com> Date: Thu, 7 Jul 2022 17:44:41 +0900 Subject: [PATCH 76/77] fix: change return type (cdp params) --- projects/portal/src/app/models/ununifi-rest.service.ts | 4 ++-- projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts | 2 +- .../src/app/pages/mint/cdps/cdp/clear/clear.component.ts | 2 +- .../src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts | 3 ++- .../src/app/pages/mint/cdps/cdp/issue/issue.component.ts | 4 ++-- .../app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts | 2 +- projects/portal/src/app/pages/mint/cdps/cdps.component.ts | 2 +- .../portal/src/app/pages/mint/cdps/create/create.component.ts | 2 +- projects/portal/src/app/pages/mint/mint.component.ts | 4 +++- 9 files changed, 14 insertions(+), 11 deletions(-) diff --git a/projects/portal/src/app/models/ununifi-rest.service.ts b/projects/portal/src/app/models/ununifi-rest.service.ts index 444811825..8063f1163 100644 --- a/projects/portal/src/app/models/ununifi-rest.service.ts +++ b/projects/portal/src/app/models/ununifi-rest.service.ts @@ -35,10 +35,10 @@ export class UnunifiRestService { this.restSdk$ = this.cosmosSDK.sdk$.pipe(pluck('rest')); } - getCdpParams$(): Observable { + getCdpParams$(): Observable { return this.restSdk$.pipe( mergeMap((sdk) => ununifi.rest.cdp.params(sdk)), - map((res) => res.data.params!), + map((res) => res.data.params), ); } diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts index a0c83048c..c00cf6a54 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/cdp.component.ts @@ -35,7 +35,7 @@ export class CdpComponent implements OnInit { ) { this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); - this.cdpParams$ = this.ununifiRest.getCdpParams$(); + this.cdpParams$ = this.ununifiRest.getCdpParams$().pipe(map((res) => res!)); this.denom$ = combineLatest([this.collateralType$, this.cdpParams$]).pipe( map(([collateralType, params]) => { const matchedDenoms = params.collateral_params?.filter( diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts index 3837720de..9ba2d269e 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/clear/clear.component.ts @@ -68,7 +68,7 @@ export class ClearComponent implements OnInit { }), ); - this.params$ = this.ununifiRest.getCdpParams$(); + this.params$ = this.ununifiRest.getCdpParams$().pipe(map((res) => res!)); this.cdp$ = combineLatest([this.owner$, this.collateralType$]).pipe( mergeMap(([ownerAddr, collateralType]) => diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts index 52de0a086..75d3d74f8 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/deposit/deposit.component.ts @@ -39,7 +39,7 @@ export class DepositComponent implements OnInit { this.key$ = this.keyStore.currentKey$.asObservable(); this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); - this.params$ = this.ununifiRest.getCdpParams$(); + this.params$ = this.ununifiRest.getCdpParams$().pipe(map((res) => res!)); //get account balance information this.address$ = this.owner$.pipe( @@ -62,6 +62,7 @@ export class DepositComponent implements OnInit { } return this.cosmosRest.getAllBalances$(address); }), + map((balances) => balances ?? []), ); this.denom$ = combineLatest([this.collateralType$, this.params$, this.balances$]).pipe( diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts index c3f4a48c1..ace21a8ce 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/issue/issue.component.ts @@ -50,7 +50,7 @@ export class IssueComponent implements OnInit { this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); - this.cdpParams$ = this.ununifiRest.getCdpParams$(); + this.cdpParams$ = this.ununifiRest.getCdpParams$().pipe(map((res) => res!)); //get account balance information this.address$ = this.owner$.pipe( map((address) => { @@ -70,7 +70,7 @@ export class IssueComponent implements OnInit { if (address === undefined) { return of([]); } - return this.cosmosRest.getAllBalances$(address); + return this.cosmosRest.getAllBalances$(address).pipe((res) => res ?? []); }), ); diff --git a/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts b/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts index cee3d47db..7c0208ce6 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdp/withdraw/withdraw.component.ts @@ -49,7 +49,7 @@ export class WithdrawComponent implements OnInit { this.key$ = this.keyStore.currentKey$.asObservable(); this.owner$ = this.route.params.pipe(map((params) => params['owner'])); this.collateralType$ = this.route.params.pipe(map((params) => params['collateralType'])); - this.cdpParams$ = this.ununifiRest.getCdpParams$(); + this.cdpParams$ = this.ununifiRest.getCdpParams$().pipe(map((res) => res!)); this.denom$ = combineLatest([this.collateralType$, this.cdpParams$]).pipe( map(([collateralType, params]) => { const matchedDenoms = params.collateral_params?.filter( diff --git a/projects/portal/src/app/pages/mint/cdps/cdps.component.ts b/projects/portal/src/app/pages/mint/cdps/cdps.component.ts index 11eb5b71a..3271d6e5a 100644 --- a/projects/portal/src/app/pages/mint/cdps/cdps.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/cdps.component.ts @@ -31,7 +31,7 @@ export class CdpsComponent implements OnInit { const collateralTypes$ = this.ununifiRest .getCdpParams$() - .pipe(map((res) => res.collateral_params?.map((p) => p.type!) || [])); + .pipe(map((res) => res?.collateral_params?.map((p) => p.type!) || [])); this.cdps$ = combineLatest([address$, collateralTypes$]).pipe( mergeMap(([address, collateralTypes]) => diff --git a/projects/portal/src/app/pages/mint/cdps/create/create.component.ts b/projects/portal/src/app/pages/mint/cdps/create/create.component.ts index 590ef754f..111f20fc0 100644 --- a/projects/portal/src/app/pages/mint/cdps/create/create.component.ts +++ b/projects/portal/src/app/pages/mint/cdps/create/create.component.ts @@ -55,7 +55,7 @@ export class CreateComponent implements OnInit { private readonly cosmosRest: CosmosRestService, ) { this.key$ = this.keyStore.currentKey$.asObservable(); - this.cdpParams$ = this.ununifiRest.getCdpParams$(); + this.cdpParams$ = this.ununifiRest.getCdpParams$().pipe(map((res) => res!)); this.collateralParams$ = this.cdpParams$.pipe(map((cdpParams) => cdpParams?.collateral_params)); this.selectedCollateralTypeSubject = new Subject(); diff --git a/projects/portal/src/app/pages/mint/mint.component.ts b/projects/portal/src/app/pages/mint/mint.component.ts index 707b6b17f..2247ddee7 100644 --- a/projects/portal/src/app/pages/mint/mint.component.ts +++ b/projects/portal/src/app/pages/mint/mint.component.ts @@ -16,7 +16,9 @@ export class MintComponent implements OnInit { constructor(private ununifiRest: UnunifiRestService) { const timer$ = timer(0, 60 * 1000); - this.cdpParams$ = timer$.pipe(mergeMap(() => this.ununifiRest.getCdpParams$())); + this.cdpParams$ = timer$.pipe( + mergeMap(() => this.ununifiRest.getCdpParams$().pipe(map((res) => res!))), + ); this.collateralParams$ = this.cdpParams$.pipe(map((cdpParams) => cdpParams?.collateral_params)); this.debtParams$ = this.cdpParams$.pipe(map((cdpParams) => cdpParams?.debt_params)); } From ab78ab20808447af03c7949e949e1dd5a45db7a1 Mon Sep 17 00:00:00 2001 From: YasunoriMATSUOKA Date: Fri, 8 Jul 2022 18:58:57 +0900 Subject: [PATCH 77/77] feat: config.js for new beta test(ununifi-beta-test-v2) --- .../firebase-hosting/config.js | 75 ++++++++++--------- .../firebase-hosting/config.js | 75 ++++++++++--------- .../firebase-hosting/config.js | 75 ++++++++++--------- 3 files changed, 114 insertions(+), 111 deletions(-) diff --git a/projects/explorer/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js b/projects/explorer/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js index f4f41b869..4fdd3c5ae 100644 --- a/projects/explorer/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js +++ b/projects/explorer/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js @@ -6,12 +6,12 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004; const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006; const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008; -const domainCauchyEA = 'ununifi-beta-test-v1.cauchye.net'; +const domainCauchyEA = 'ununifi-beta-test-v2.cauchye.net'; // const domainCauchyEB = 'b.private-test.ununifi.cauchye.net'; // const domainCauchyEC = 'c.private-test.ununifi.cauchye.net'; // const domainCauchyED = 'd.private-test.ununifi.cauchye.net'; -const chainID = 'ununifi-9-beta-test'; +const chainID = 'ununifi-beta-test-v2'; const chainName = 'UnUniFi (beta-test)'; const bech32Prefix = { @@ -57,41 +57,42 @@ const configs = [ ], extension: { faucet: [ - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUbtcPort}`, - denom: 'ubtc', - creditAmount: 100, // amount to credit in max request - maxCredit: 99, // account has already maxCredit balance cannot claim anymore - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUguuPort}`, - denom: 'uguu', - creditAmount: 2000000, - maxCredit: 1999999, - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetJpuPort}`, - denom: 'jpu', - creditAmount: 10, - maxCredit: 9, - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUethPort}`, - denom: 'ueth', - creditAmount: 1000, - maxCredit: 999, - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetEuuPort}`, - denom: 'euu', - creditAmount: 10, - maxCredit: 9, - }, + // Todo: After setup faucet, enable the following faucet. + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUbtcPort}`, + // denom: 'ubtc', + // creditAmount: 100, // amount to credit in max request + // maxCredit: 99, // account has already maxCredit balance cannot claim anymore + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUguuPort}`, + // denom: 'uguu', + // creditAmount: 2000000, + // maxCredit: 1999999, + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetJpuPort}`, + // denom: 'jpu', + // creditAmount: 10, + // maxCredit: 9, + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUethPort}`, + // denom: 'ueth', + // creditAmount: 1000, + // maxCredit: 999, + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetEuuPort}`, + // denom: 'euu', + // creditAmount: 10, + // maxCredit: 9, + // }, ], monitor: undefined, navigations: [], diff --git a/projects/marketplace/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js b/projects/marketplace/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js index 48fee4209..c7485d1f7 100644 --- a/projects/marketplace/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js +++ b/projects/marketplace/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js @@ -6,12 +6,12 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004; const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006; const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008; -const domainCauchyEA = 'ununifi-beta-test-v1.cauchye.net'; +const domainCauchyEA = 'ununifi-beta-test-v2.cauchye.net'; // const domainCauchyEB = 'b.private-test.ununifi.cauchye.net'; // const domainCauchyEC = 'c.private-test.ununifi.cauchye.net'; // const domainCauchyED = 'd.private-test.ununifi.cauchye.net'; -const chainID = 'ununifi-9-beta-test'; +const chainID = 'ununifi-beta-test-v2'; const chainName = 'UnUnuFi (beta-test)'; const bech32Prefix = { @@ -58,41 +58,42 @@ const configs = [ ], extension: { faucet: [ - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUbtcPort}`, - denom: 'ubtc', - creditAmount: 100, // amount to credit in max request - maxCredit: 99, // account has already maxCredit balance cannot claim anymore - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUguuPort}`, - denom: 'uguu', - creditAmount: 2000000, - maxCredit: 1999999, - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetJpuPort}`, - denom: 'jpu', - creditAmount: 10, - maxCredit: 9, - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUethPort}`, - denom: 'ueth', - creditAmount: 1000, - maxCredit: 999, - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetEuuPort}`, - denom: 'euu', - creditAmount: 10, - maxCredit: 9, - }, + // Todo: After setup faucet, enable the following faucet. + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUbtcPort}`, + // denom: 'ubtc', + // creditAmount: 100, // amount to credit in max request + // maxCredit: 99, // account has already maxCredit balance cannot claim anymore + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUguuPort}`, + // denom: 'uguu', + // creditAmount: 2000000, + // maxCredit: 1999999, + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetJpuPort}`, + // denom: 'jpu', + // creditAmount: 10, + // maxCredit: 9, + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUethPort}`, + // denom: 'ueth', + // creditAmount: 1000, + // maxCredit: 999, + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetEuuPort}`, + // denom: 'euu', + // creditAmount: 10, + // maxCredit: 9, + // }, ], monitor: undefined, navigations: [], diff --git a/projects/portal/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js b/projects/portal/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js index 48fee4209..c7485d1f7 100644 --- a/projects/portal/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js +++ b/projects/portal/editions/ununifi/launch/ununifi-beta-test/firebase-hosting/config.js @@ -6,12 +6,12 @@ const faucetJpuPort = location.protocol === 'https:' ? 8005 : 8004; const faucetUethPort = location.protocol === 'https:' ? 8007 : 8006; const faucetEuuPort = location.protocol === 'https:' ? 8009 : 8008; -const domainCauchyEA = 'ununifi-beta-test-v1.cauchye.net'; +const domainCauchyEA = 'ununifi-beta-test-v2.cauchye.net'; // const domainCauchyEB = 'b.private-test.ununifi.cauchye.net'; // const domainCauchyEC = 'c.private-test.ununifi.cauchye.net'; // const domainCauchyED = 'd.private-test.ununifi.cauchye.net'; -const chainID = 'ununifi-9-beta-test'; +const chainID = 'ununifi-beta-test-v2'; const chainName = 'UnUnuFi (beta-test)'; const bech32Prefix = { @@ -58,41 +58,42 @@ const configs = [ ], extension: { faucet: [ - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUbtcPort}`, - denom: 'ubtc', - creditAmount: 100, // amount to credit in max request - maxCredit: 99, // account has already maxCredit balance cannot claim anymore - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUguuPort}`, - denom: 'uguu', - creditAmount: 2000000, - maxCredit: 1999999, - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetJpuPort}`, - denom: 'jpu', - creditAmount: 10, - maxCredit: 9, - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUethPort}`, - denom: 'ueth', - creditAmount: 1000, - maxCredit: 999, - }, - { - hasFaucet: false, - faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetEuuPort}`, - denom: 'euu', - creditAmount: 10, - maxCredit: 9, - }, + // Todo: After setup faucet, enable the following faucet. + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUbtcPort}`, + // denom: 'ubtc', + // creditAmount: 100, // amount to credit in max request + // maxCredit: 99, // account has already maxCredit balance cannot claim anymore + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUguuPort}`, + // denom: 'uguu', + // creditAmount: 2000000, + // maxCredit: 1999999, + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetJpuPort}`, + // denom: 'jpu', + // creditAmount: 10, + // maxCredit: 9, + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetUethPort}`, + // denom: 'ueth', + // creditAmount: 1000, + // maxCredit: 999, + // }, + // { + // hasFaucet: false, + // faucetURL: `${location.protocol}//${domainCauchyEA}:${faucetEuuPort}`, + // denom: 'euu', + // creditAmount: 10, + // maxCredit: 9, + // }, ], monitor: undefined, navigations: [],