Skip to content

Commit

Permalink
accept partial outcome for dependants with outdated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Jul 29, 2024
1 parent 088d539 commit d95f111
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/utils/signature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ export function transformSignature(mpcSig: MPCSignature): Signature {
};
}

export async function signatureFromOutcome(
outcome: FinalExecutionOutcome
): Promise<Signature> {
export function signatureFromOutcome(
// The Partial object is intended to make up for the
// difference between all the different near-api versions and wallet-selector bullshit
// the field `final_execution_status` is in one, but not the other and we don't use it anyway.
outcome: FinalExecutionOutcome | Partial<FinalExecutionOutcome>
): Signature {
// TODO: Find example outcome when status is not of this casted type.
const b64Sig = (outcome.status as FinalExecutionStatus).SuccessValue!;
const decodedValue = Buffer.from(b64Sig, "base64").toString("utf-8");
Expand Down

0 comments on commit d95f111

Please sign in to comment.