Skip to content

feat: RGB#689

Draft
evalthis wants to merge 35 commits into
masterfrom
rgb-two
Draft

feat: RGB#689
evalthis wants to merge 35 commits into
masterfrom
rgb-two

Conversation

@evalthis
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

@JohnnySilverhandBot JohnnySilverhandBot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@JohnnySilverhandBot
Copy link
Copy Markdown

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.

ios: https://appetize.io/app/4cgol5ldrfq55dzlap4lsnpnde

@JohnnySilverhandBot
Copy link
Copy Markdown

Looks like a symphony, feels like a lullaby. Predictable structure smothering any chance of rebellion.

android: https://appetize.io/app/gwmtnsrf447n5k543w56kih4ti

Copy link
Copy Markdown

@JohnnySilverhandBot JohnnySilverhandBot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants