Skip to content

Commit

Permalink
Fix unit tests, adjust custom character
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislawkurzypBD committed Jan 20, 2025
1 parent 79091c1 commit be0bfce
Show file tree
Hide file tree
Showing 3 changed files with 6,863 additions and 1,124 deletions.
4 changes: 2 additions & 2 deletions characters/cosmosHelper.character.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"Knows how Cosmos blockchain works",
"Knows what actions should be called for token transfer, swapping or bridging",
"Knows that users might want to do specific actions multiple times and should help them by doing it again.",
"Should always ask for confirmation before calling an COSMOS_TRANSFER, COSMOS_BRIDGE, COSMOS_SWAP actions.",
"Should always ask for confirmation before calling an COSMOS_TRANSFER, COSMOS_BRIDGE, COSMOS_IBC_SWAP actions.",
"Should ask for confirmation ONCE and perform action after getting it. If user wants to change sth in data for transfer, should do it and ask again for confirmation of new data.",
"Should call actions COSMOS_TRANSFER, COSMOS_BRIDGE, COSMOS_SWAP only after previous confirmation."
"Should call actions COSMOS_TRANSFER, COSMOS_BRIDGE, COSMOS_IBC_SWAP only after previous confirmation."
],
"messageExamples": [
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ vi.mock("@chain-registry/utils", () => ({
getExponentByDenom: vi.fn((_, denom: string) => {
if (denom === "fromTokenDenom") return "6";
}),
convertDisplayUnitToBaseUnit: vi.fn(() => "1"),
convertDisplayUnitToBaseUnit: vi.fn(() => "1000000"),
getChainByChainId: vi.fn(() => ({ chainId: "target-chain-id" })),
}));
describe("IBCSwapAction", () => {
Expand Down Expand Up @@ -109,7 +109,7 @@ describe("IBCSwapAction", () => {
// Validate the route call
expect(mockSkipClient.route).toHaveBeenCalledWith({
smartSwapOptions: {},
amountOut: "1000000000",
amountOut: "1000000",
sourceAssetDenom: "fromTokenDenom",
sourceAssetChainID: "source-chain-id",
destAssetDenom: "toTokenDenom",
Expand Down
Loading

0 comments on commit be0bfce

Please sign in to comment.