getAlby / nostr-wallet-connect

Nostr Wallet Connect (NIP-47) application to allow apps to connect to your node
https://nwc.getalby.com
Apache License 2.0
103 stars 31 forks source link

get_balance does not follow the spec #216

Open rolznz opened 7 months ago

rolznz commented 7 months ago

Example response:

{"result":{"balance":2575000,"max_amount":0,"budget_renewal":""},"result_type":"get_balance"}

This gives an error with rust-nostr:

Err(JSON(Error("Json: unknown variant ``, expected one of `daily`, `weekly`, `monthly`, `yearly`", line: 0, column: 0)))

If not set, the budget_renewal should not be included in the response. Currently it is an empty string.

but should max_amount and budget_renewal just be removed? they are based on permissions which are not part of the spec.