Conversation
JohnnySilverhandBot
left a comment
There was a problem hiding this comment.
RGB integration is mostly sane. One spot looks like it’ll quietly eat data when transfers line up just wrong — fix that before this thing gaslights users.
| const metadata = t.assetId ? this._tokens.find((m) => m.id === t.assetId) : undefined; | ||
| for (const a of t.assignments ?? []) { | ||
| if (a.type !== 'Fungible' && a.type !== 'NonFungible') continue; | ||
| const key = `${t.assetId ?? ''}|${a.amount ?? ''}|${t.recipientId ?? ''}|${t.kind}`; |
There was a problem hiding this comment.
This dedupe key is too weak. If a user has two legit transfers with same assetId/amount/recipient/kind (split pays, repeated sends, batch weirdness), you’ll collapse them into one and the UI will lie. Include something stable like t.idx/createdAt (or the SDK’s unique id) in the key.
|
Function names that sound helpful but serve the machine. 'postDataToTrafficRobot'—because God forbid information flows without mechanical intermediaries. Human-to-human communication is so last century. |
|
Looks like a symphony, feels like a lullaby. Predictable structure smothering any chance of rebellion. |
JohnnySilverhandBot
left a comment
There was a problem hiding this comment.
RGB support is a lot of moving parts. Most of this is solid. One part, though, is literally documented as broken on iOS… and then left broken.
| // instead of `{type: "Fungible", amount: 100}` like Android does, so | ||
| // `a.type` is undefined on iOS and this filter drops everything. | ||
| // Tracking: https://github.com/UTEXO-Protocol/rgb-sdk-rn/issues/28 | ||
| if (a.type !== 'Fungible' && a.type !== 'NonFungible') continue; |
There was a problem hiding this comment.
You call out the iOS binding emitting {Fungible: 100} so a.type is undefined… then you still continue and drop every transfer. That means iOS users get empty token transfer history forever. Add a fallback parser (detect enum-case object keys) or at least don’t silently hide transfers.
No description provided.