Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Chore: payment sent notification improvements #472

Merged
merged 6 commits into from
Jun 20, 2024

Conversation

rolznz
Copy link
Collaborator

@rolznz rolznz commented Jun 20, 2024

  • refactor to better support multiple notification types
  • remove unnecessary properties in payment_received and payment_sent events
  • duration is wrong, I need to remove it or rename it (since it's the duration since the invoice was created) - removed the duration property for now
  • When originally implementing notifications which was that "notifications" was being returned in the methods parameter of the get_info call and we didn't even include what notification types are supported there (which would be empty if you don't allow the notifications permission).

get_info now looks like this:

{
  alias: 'NWC',
  color: '#897FFF',
  pubkey: '0219b1a2bf969944e941f72595db5a5dd55531db00972d41bf8099e499dcaea894',
  network: 'signet',
  block_height: 1190784,
  block_hash: '00000043a9e987f7bff8cfb4b5cb3131ddc291c1e8131f889e952f847c4eda17',
  methods: [
    'get_balance',
    'get_info',
    'list_transactions',
    'lookup_invoice',
    'make_invoice',
    'pay_invoice',
    'sign_message',
    'pay_keysend',
    'multi_pay_invoice',
    'multi_pay_keysend'
  ],
  notifications: [ 'payment_received', 'payment_sent' ]
}

I think we should prioritize this issue: getAlby/hub#139

@rolznz rolznz requested review from bumi and im-adithya June 20, 2024 09:11
@rolznz rolznz merged commit 9f46bb2 into task-payment-sent Jun 20, 2024
7 checks passed
@rolznz rolznz deleted the chore/task-payment-sent-feedback branch June 20, 2024 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant