bludda on Nostr: Because 'on' method does not support accepting functions that return promises (your ...
Because 'on' method does not support accepting functions that return promises (your handles is async fn). It will work, until rejected promise will crash your app. TS does a poor job at warning on these mistakes.
{
"id":"08cd159d0580126a41fd8d87651d3e4321d5ec5a37f327e27541322975f7c46a",
"pubkey":"6d43414d2b9a556742909662448f720007cdfdfb4fabd7f39e1f8bb737f4dbbc",
"created_at":1711423358,
"kind":1,
"tags": [
[
"e",
"1f2dbf2ac289c4444def9137ad627dc08b15bd65e8cd24a66d05cad1db319aed",
"",
"reply"
],
[
"p",
"6b9da920c4b6ecbf2c12018a7a2d143b4dfdf9878c3beac69e39bb597841cc6e"
],
[
"e",
"73fe2b8ea97dd34df0c4ca7f74849e871e5a9deab3cce3006e465399a77ee80d",
"wss://relay.damus.io/",
"root"
]
],
"content":"Because 'on' method does not support accepting functions that return promises (your handles is async fn). It will work, until rejected promise will crash your app. \nTS does a poor job at warning on these mistakes.",
"sig":"7de39bb41a29d60219bbea83cc45af38dccb5d522f2689db25948708ab16774307704faa28eb68dfe628c04b7f7f6efca3b1cffac92135b8e93ffc98e3a442c3"
}