effectai / effect-js

JavaScript Library to access and develop dApps on Effect Network.
https://effect.network
Other
58 stars 3 forks source link

Error swapping #112

Closed djmbritt closed 5 months ago

djmbritt commented 6 months ago

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.

Jeffrieh commented 6 months ago

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 ?

djmbritt commented 6 months ago

Great, let me check it.

djmbritt commented 6 months ago

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 commented 6 months ago

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
Jeffrieh commented 5 months ago

these errors seem to be related to undeployed contracts on mainnet