I am trying to delete a canister and withdraw the remaining cycles from it using this call
dfx canister --network ic delete --withdraw-cycles-to-dank
The call fails right after the console prints this
Transfering 3883671082016 cycles to dank principal .
with an error saying
The invocation to the wallet call forward method failed with the error: An error happened during the call: 5: IC0503: Canister trapped explicitly: Custom(Fail to decode argument 0 from table0 to principal
> Caused by: > 0: input: 4449444c016e680100_01011dcec68e31c2ed30bd538dc5d5db7399095d6ddc5c6565d9faf1b2036b02 > table: type table0 = opt principal > wire_type: table0, expect_type: principal > 1: table0 is not a subtype of principal > 2: opt principal is not a subtype of principal)
The canister is written in Motoko