Skip to content

Commit

Permalink
fixup! refactor(types): extract CosmosStakingFacet
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed May 14, 2024
1 parent 2d5ff27 commit d27356a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions packages/orchestration/src/examples/swapExample.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ export const start = async (zcf, privateArgs) => {
await localAccount
.transferSteps(give.USDC, transferMsg)
.then(_txResult =>
celestiaAccount
.getStakingFacet()
.delegate(offerArgs.validator, offerArgs.staked),
celestiaAccount.delegate(offerArgs.validator, offerArgs.staked),
)
.catch(e => console.error(e));

Expand Down
5 changes: 2 additions & 3 deletions packages/orchestration/src/examples/unbondExample.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ export const start = async (zcf, privateArgs) => {
// keeping it focused on long-running operations.
const celestia = await orch.getChain('celestia');
const celestiaAccount = await celestia.makeAccount();
const celestiaStaking = celestiaAccount.getStakingFacet();

const delegations = await celestiaStaking.getDelegations();
const delegations = await celestiaAccount.getDelegations();
// wait for the undelegations to be complete (may take weeks)
await celestiaStaking.undelegate(delegations);
await celestiaAccount.undelegate(delegations);

// ??? should this be synchronous? depends on how names are resolved.
const stride = await orch.getChain('stride');
Expand Down

0 comments on commit d27356a

Please sign in to comment.