HomePhabricator

[Cashtab] Patch bug in manage agora offers

Description

[Cashtab] Patch bug in manage agora offers

Summary:
When Orderbook was refactored so that each component owned its offer lookups, did not properly manage the distinction in how we fetch offers by pub key (agora call returns all offers, including multiple offers for the same token) and other offers (agora call returns tokenIds only, uniquely).

Correct this by using a Set to track tokenIds of managed offers. Convert to a sorted array before rendering.

Test Plan:
npm test

Create two offers with the same token ID
npm start
navigate to Agora page
toggle "manage" switch
no "duplicate key" error, no repeated orderbooks

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

Subscribers: emack

Differential Revision: https://reviews.bitcoinabc.org/D17063

Details

Provenance
bytesofmanAuthored on Nov 2 2024, 14:35
bytesofmanPushed on Nov 4 2024, 17:24
Reviewer
Restricted Project
Differential Revision
D17063: [Cashtab] Patch bug in manage agora offers
Parents
rABCba63229e2b34: [ecash-herald + token-server] Update typescript and docker build settings
Branches
Unknown
Tags
Unknown