Open DFL-Levi opened 3 years ago
https://github.com/project-serum/swap/blob/7bfa4d6fab0ba7586f038389c5126c825a512324/programs/swap/src/lib.rs#L527 When creating the new token it was returning the promise but i missed it. I was not waiting but the error log i got was pretty bad: Program log: panicked at 'called Option::unwrap() on a None value', programs/swap/src/lib.rs:527:48
Program log: panicked at 'called Option::unwrap() on a None value', programs/swap/src/lib.rs:527:48
I think program should provide a better error for that case! As i checked with developer of serum he told me: We can simply add some require! statements before the unwrap.
Faced a similar error:
https://github.com/project-serum/swap/blob/7bfa4d6fab0ba7586f038389c5126c825a512324/programs/swap/src/lib.rs#L527 When creating the new token it was returning the promise but i missed it. I was not waiting but the error log i got was pretty bad:
Program log: panicked at 'called Option::unwrap() on a None value', programs/swap/src/lib.rs:527:48
I think program should provide a better error for that case! As i checked with developer of serum he told me: We can simply add some require! statements before the unwrap.