Skip to content

fix #719#721

Merged
Rigidity merged 1 commit into
xch-dev:mainfrom
dkackman:bug-719
Dec 19, 2025
Merged

fix #719#721
Rigidity merged 1 commit into
xch-dev:mainfrom
dkackman:bug-719

Conversation

@dkackman

Copy link
Copy Markdown
Collaborator

Fix #719

When a asset record is created but not submitted to the mempool, the next createion may use the same coin and then there is a conflict between the next asset record and the cancelled one. Current COALESCE in the insert clause prefers the first record rather than the latest.

fix is to reverse that. prefer the latest record on conflict.

INSERT INTO assets (
    hash, kind, name, ticker, precision, icon_url, description,
    is_sensitive_content, is_visible, hidden_puzzle_hash
)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
ON CONFLICT(hash) DO UPDATE SET
    name = COALESCE(excluded.name, name),
    ticker = COALESCE(excluded.ticker, ticker),
    icon_url = COALESCE(excluded.icon_url, icon_url),
    description = COALESCE(excluded.description, description),
    is_sensitive_content = is_sensitive_content OR excluded.is_sensitive_content

@Rigidity Rigidity merged commit db17c91 into xch-dev:main Dec 19, 2025
0 of 8 checks passed
@dkackman dkackman deleted the bug-719 branch April 19, 2026 23:50
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.

[BUG][UI] Profile creation retains the initially entered Profile Name

2 participants