Skip to content

Commit

Permalink
refactor: use cosmjs-types Any
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Apr 11, 2024
1 parent b8fc487 commit 073d4ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 5 additions & 4 deletions packages/boot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"license": "Apache-2.0",
"dependencies": {
"@agoric/assert": "^0.6.0",
"@agoric/cosmic-proto": "^0.4.0",
"@agoric/builders": "^0.1.0",
"@agoric/cosmic-proto": "^0.4.0",
"@agoric/cosmic-swingset": "^0.41.3",
"@agoric/ertp": "^0.16.2",
"@agoric/internal": "^0.3.2",
"@agoric/inter-protocol": "^0.16.1",
"@agoric/internal": "^0.3.2",
"@agoric/kmarshal": "^0.1.0",
"@agoric/notifier": "^0.6.2",
"@agoric/orchestration": "^0.1.0",
Expand All @@ -37,12 +37,12 @@
"@agoric/vm-config": "^0.1.0",
"@agoric/zoe": "^0.26.2",
"@agoric/zone": "^0.2.2",
"@endo/marshal": "^1.4.1",
"@endo/bundle-source": "^3.2.2",
"@endo/captp": "^4.1.1",
"@endo/eventual-send": "^1.2.1",
"@endo/init": "^1.1.1",
"@endo/far": "^1.1.1",
"@endo/init": "^1.1.1",
"@endo/marshal": "^1.4.1",
"@endo/promise-kit": "^1.1.1",
"@endo/stream": "^1.2.1",
"import-meta-resolve": "^2.2.1"
Expand All @@ -56,6 +56,7 @@
"@endo/patterns": "^1.3.1",
"ava": "^5.3.0",
"c8": "^9.1.0",
"cosmjs-types": "^0.9.0",
"tsx": "3.12.8"
},
"files": [
Expand Down
7 changes: 4 additions & 3 deletions packages/boot/test/bootstrapTests/test-vat-orchestration.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { test as anyTest } from '@agoric/zoe/tools/prepare-test-env-ava.js';
import type { ExecutionContext, TestFn } from 'ava';

import {
MsgDelegate,
MsgDelegateResponse,
} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js';
import { decodeBase64 } from '@endo/base64';
import { M, matches } from '@endo/patterns';
import { txToBase64 } from '@agoric/orchestration';
import { Any } from 'cosmjs-types/google/protobuf/any.js';
import { makeWalletFactoryContext } from './walletFactory.ts';

const makeTestContext = async (t: ExecutionContext) =>
Expand All @@ -22,7 +23,7 @@ const test: TestFn<DefaultTestContext> = anyTest;
* If adding a new msg, reference the mock in the `sendPacket` switch statement
* in [supports.ts](../../tools/supports.ts).
*/
const delegateMsgSuccess = txToBase64(
const delegateMsgSuccess = Any.fromJSON(
MsgDelegate.toProtoMsg({
delegatorAddress: 'cosmos1test',
validatorAddress: 'cosmosvaloper1test',
Expand Down Expand Up @@ -157,7 +158,7 @@ test('ICA connection can send msg with proto3', async t => {
'txWithOptions',
);

const delegateMsgFailure = txToBase64(
const delegateMsgFailure = Any.fromJSON(
MsgDelegate.toProtoMsg({
delegatorAddress: 'cosmos1fail',
validatorAddress: 'cosmosvaloper1fail',
Expand Down

0 comments on commit 073d4ce

Please sign in to comment.