effect-js icon indicating copy to clipboard operation
effect-js copied to clipboard

Error swapping

Open djmbritt opened this issue 9 months ago • 4 comments

There is an error swapping on eos mainnet, I've notifed it while bootstrapping the testing framework.

✓ Swap > swap() should throw an error when Session is not set on Client. [0.29ms]

93 | efxPrice, 94 | }); 95 | 96 | return await transact({ action }); 97 | } catch (e) { 98 | throw new Error(Error swapping tokens\n${e}); ^ error: Error swapping tokens Error: transaction declares authority '{"actor":"cryptonode42","permission":"owner"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [], provided keys ["redacted_key_here"], and a delay max limit of 3888000000 ms at /home/djmbritt/Effect/effect-js/src/actions/token/swap.ts:98:9

I'm not understanding what the error is, but I'm writing it here for future reference. First thoughts are as stated in the error message, that the transasction is not signed by the owner, but I'm pretty sure I'm using the right keys, need to double check that.

djmbritt avatar Apr 29 '24 20:04 djmbritt

Good catch !! I think there was something wrong with the enum/object indexing for the actions, i fixed that now, could you try it again ?

Jeffrieh avatar Apr 30 '24 15:04 Jeffrieh

Great, let me check it.

djmbritt avatar Apr 30 '24 15:04 djmbritt

Nope, that's not it, still getting the same error.

error: transaction declares authority '{"actor":"cryptonode42","permission":"owner"}', but does not have signatures for it under a provid
ed delay of 0 ms, provided permissions [], provided keys ["redacted_key"], and a delay max limit
 of 3888000000 ms

I'm thinking it has to be a parameter somewhere in the Session.

There is an upgradeTransaction function where you can set the delay_sec parameter.

https://github.com/wharfkit/session/blob/749881f84aee1d01586c24c9ed098a11e95d0b5a/src/session.ts#L208

djmbritt avatar Apr 30 '24 16:04 djmbritt

I'm also getting the same kind of error when I try to another kind of authorized transaction, in this case a deposit:

error: transaction declares authority '{"actor":"cryptonode42","permission":"active"}', but does not have signatures for it under a provided delay of 0 ms, provided permissions [], provided keys ["key_redacted"], and a delay max limit of 3888000000 ms

djmbritt avatar Apr 30 '24 17:04 djmbritt

these errors seem to be related to undeployed contracts on mainnet

Jeffrieh avatar May 21 '24 13:05 Jeffrieh