Skip to content

Commit

Permalink
fix: target_canister not target_canister_id
Browse files Browse the repository at this point in the history
Signed-off-by: David Dal Busco <david.dalbusco@dfinity.org>
  • Loading branch information
peterpeterparker committed Nov 26, 2024
1 parent 3e13e8b commit f7da765
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/ic-management/src/ic-management.canister.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ export class ICManagementCanister {
*/
const transform = (
_methodName: string,
args: Record<string, unknown> &
{ canister_id?: unknown; target_canister_id?: unknown }[],
args: (Record<string, unknown> & {
canister_id?: unknown;
target_canister?: unknown;
})[],
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_callConfig: CallConfig,
): { effectiveCanisterId: Principal } => {
Expand All @@ -60,9 +62,9 @@ export class ICManagementCanister {
return { effectiveCanisterId: Principal.from(first.canister_id) };
}

if (nonNullish(first.target_canister_id)) {
if (nonNullish(first.target_canister)) {
return {
effectiveCanisterId: Principal.from(first.target_canister_id),
effectiveCanisterId: Principal.from(first.target_canister),
};
}
}
Expand Down

0 comments on commit f7da765

Please sign in to comment.