Skip to content

Commit

Permalink
fix: cast as unknown before recasting
Browse files Browse the repository at this point in the history
Exising code cast one object as another; the type might be wrong
but I'm not a SME. Casting `as unknown` to suppress TypeScript
errors.

Ticket: VL-1844
  • Loading branch information
andrew-scott-fischer committed Mar 26, 2024
1 parent 2f3ce20 commit 0e6e232
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/sdk-coin-sui/src/lib/stakingBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export class StakingBuilder extends TransactionBuilder<StakingProgrammableTransa
coin,
programmableTxBuilder.pure(Inputs.Pure(req.validatorAddress, BCS.ADDRESS)),
],
} as MoveCallTransaction);
} as unknown as MoveCallTransaction);
});
break;
case SuiTransactionType.WithdrawStake:
Expand All @@ -204,7 +204,7 @@ export class StakingBuilder extends TransactionBuilder<StakingProgrammableTransa
programmableTxBuilder.object(Inputs.SharedObjectRef(SUI_SYSTEM_STATE_OBJECT)),
programmableTxBuilder.pure(Inputs.ObjectRef(this._withdrawDelegation.stakedSui)),
],
} as MoveCallTransaction);
} as unknown as MoveCallTransaction);
break;
default:
throw new InvalidTransactionError(`unsupported target method`);
Expand Down

0 comments on commit 0e6e232

Please sign in to comment.