I have this block of code:
public shared ({ caller }) func generateBtcAddress() : async Text {
let acc = {
owner = ?Principal.fromActor(this);
subaccount = ?Principal.toBlob(caller);
};
let minterActor : Minter.Minter = actor (Constants.CKBTC_Minter);
return await minterActor.get_btc_address(acc);
};
That uses the ckbtc minter to generate a btc address but I always get a sys timeout error.
I have tried calling the exact same endpoint with the same paramters via a dfx command and get the expected response.
this is the Minter.mo service
public type Minter = actor {
estimate_withdrawal_fee : shared query { amount : ?Nat64 } -> async {
minter_fee : Nat64;
bitcoin_fee : Nat64;
};
get_btc_address : shared {
owner : ?Principal;
subaccount : ?Blob;
} -> async Text;
....
....
This is the exact error
Error: Failed update call.
Caused by: Failed update call.
The replica returned a rejection error: reject code SysTransient, reject message Ingress message 0xade4964f011c588edc74b3821eeac6aa68000a7418c78a60bf2b1fb71bd49908 timed out waiting to start executing., error code None
Why on earth would this be the case?
I am also now using a node.js sever to get the btc address using the same parameters and it works fine…