kinecosystem / kin-node

DEPRECATED! Please use Kinetic: https://developer.kin.org/docs/kinetic
https://developer.kin.org/docs/kinetic
MIT License
16 stars 14 forks source link

Missing "Earns" for app users: Node SDK should fail gracefully for "unknown" return code from Agora, instead of returning "success" #21

Open rorymc opened 2 years ago

rorymc commented 2 years ago

The submit transaction result only accounts for "error" or "success", and mis-handles "unknown" as "success" https://github.com/kinecosystem/kin-node/blob/4295b4fbde73714c7bd63771ca0ac066b0300f7a/src/client/internal.ts#L49

this causes the issue where if Agora or blockchain has a problem (e.g. runs out of SOL, the blockchain has some delay), then Agora will return "unknown" instead of "error" or "success". Here's the problem:

this leads to the problem where:

see discussion in this Discord thread.

hitwill commented 2 years ago

Transferring information here posted by @richardmands

https://discord.com/channels/808859554997469244/923258669846655036/928755367654084638

image