Skip to content

Commit

Permalink
fix: 🐛 fix test types
Browse files Browse the repository at this point in the history
  • Loading branch information
DavideSegullo committed May 30, 2024
1 parent 6dcdd52 commit 39806bf
Show file tree
Hide file tree
Showing 5 changed files with 283 additions and 203 deletions.
2 changes: 1 addition & 1 deletion packages/stores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@cosmjs/math": "0.32.3",
"@cosmjs/proto-signing": "0.32.3",
"@cosmjs/stargate": "0.32.3",
"@cosmos-kit/core": "^2.10.0",
"@cosmos-kit/core": "^2.12.0",
"@keplr-wallet/common": "0.10.24-ibc.go.v7.hot.fix",
"@keplr-wallet/cosmos": "0.10.24-ibc.go.v7.hot.fix",
"@keplr-wallet/proto-types": "0.10.24-ibc.go.v7.hot.fix",
Expand Down
1 change: 0 additions & 1 deletion packages/stores/src/account/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ import {
TxRaw,
} from "cosmjs-types/cosmos/tx/v1beta1/tx";
import dayjs from "dayjs";
import Long from "long";
import { LRUCache } from "lru-cache";
import { action, autorun, makeObservable, observable, runInAction } from "mobx";
import { fromPromise, IPromiseBasedObservable } from "mobx-utils";
Expand Down
24 changes: 20 additions & 4 deletions packages/stores/src/tests/test-wallet.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { OfflineAminoSigner, StdSignDoc, StdTx } from "@cosmjs/amino";
import { Algo, OfflineDirectSigner } from "@cosmjs/proto-signing";
import {
Algo,
DirectSignResponse,
OfflineDirectSigner,
} from "@cosmjs/proto-signing";
import {
BroadcastMode,
ChainRecord,
Expand All @@ -13,6 +17,7 @@ import {
WalletClient,
} from "@cosmos-kit/core";
import Axios from "axios";
import Long from "long";

import { MockChainList } from "./mock-data";
import { MockKeplrWithFee } from "./mock-keplr-with-fee";
Expand Down Expand Up @@ -173,13 +178,24 @@ export class MockKeplrClient implements WalletClient {
signer: string,
signDoc: DirectSignDoc,
signOptions?: SignOptions
): ReturnType<MockKeplrWithFee["signDirect"]> {
return await this.client.signDirect(
): Promise<DirectSignResponse> {
const result = await this.client.signDirect(
chainId,
signer,
signDoc as any,
{
...signDoc,
accountNumber: Long.fromString(signDoc.accountNumber!.toString()),
},
signOptions
);

return {
...result,
signed: {
...result.signed,
accountNumber: BigInt(result.signed.accountNumber.toString()),
},
};
}

async sendTx(chainId: string, tx: Uint8Array, mode: BroadcastMode) {
Expand Down
16 changes: 8 additions & 8 deletions packages/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
"@cosmjs/encoding": "0.32.3",
"@cosmjs/proto-signing": "0.32.3",
"@cosmjs/stargate": "0.32.3",
"@cosmos-kit/core": "^2.10.0",
"@cosmos-kit/cosmostation": "^2.8.0",
"@cosmos-kit/keplr": "^2.8.0",
"@cosmos-kit/leap": "^2.8.0",
"@cosmos-kit/okxwallet": "^2.6.0",
"@cosmos-kit/station": "^2.7.0",
"@cosmos-kit/xdefi": "^2.7.0",
"@cosmos-kit/core": "^2.12.0",
"@cosmos-kit/cosmostation": "^2.10.0",
"@cosmos-kit/keplr": "^2.10.1",
"@cosmos-kit/leap": "^2.11.0",
"@cosmos-kit/okxwallet": "^2.8.0",
"@cosmos-kit/station": "^2.9.0",
"@cosmos-kit/xdefi": "^2.9.0",
"@ethersproject/abi": "^5.7.0",
"@headlessui/react": "^1.7.8",
"@keplr-wallet/common": "0.10.24-ibc.go.v7.hot.fix",
Expand All @@ -50,9 +50,9 @@
"@next/bundle-analyzer": "^12.1.6",
"@notifi-network/notifi-frontend-client": "0.87.0",
"@notifi-network/notifi-react-card": "0.87.0",
"@osmosis-labs/bridge": "^1.0.0",
"@osmosis-labs/keplr-hooks": "0.10.24-ibc.go.v7.hot.fix",
"@osmosis-labs/keplr-stores": "0.10.24-ibc.go.v7.hot.fix",
"@osmosis-labs/bridge": "^1.0.0",
"@osmosis-labs/math": "^5.1.0",
"@osmosis-labs/pools": "^5.1.0",
"@osmosis-labs/server": "^1.0.0",
Expand Down
Loading

0 comments on commit 39806bf

Please sign in to comment.