Skip to content

Open the asset behind a perpetual market - #1535

Merged
gemdev111 merged 4 commits into
mainfrom
feature/perpetual-official-asset
Oct 13, 2026
Merged

gemdev111 merged 4 commits into
mainfrom
feature/perpetual-official-asset

Conversation

@gemdev111

@gemdev111 gemdev111 commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

A perpetual market now shows the asset it tracks under Info — Bitcoin on the BTC market, PancakeSwap on BNB Chain on CAKE — and tapping it opens that asset's screen to buy, swap or receive it. The link comes from Gem's asset associations, is kept on the device and shows offline. Available on iOS and Android.

iOS Android
ios-1-perp android-1-perp

A perpetual market shows the asset it tracks under Info (Bitcoin on BTC,
PancakeSwap on BNB Chain on CAKE); tapping it opens the asset screen.

The market refresh stores the asset's official association through
update_asset, and both apps read it from storage with AssociatedAssetsQuery,
so the row shows offline and updates when the refresh saves it.
@gemdev111 gemdev111 self-assigned this Oct 12, 2026
),
initialValue: [],
)
associatedAssetsQuery = ObservableQuery(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seems redundant, you should be able to fetch asset via perpetualQuery?

PerpetualQuery already joins the perpetual's asset, so it reads the official
associated assets with it; the separate AssociatedAssetsQuery is gone on both
apps.
@gemdev111
gemdev111 marked this pull request as ready for review October 13, 2026 10:20
}

#[uniffi::export]
pub fn perpetual_associated_asset_rows(assets: Vec<Asset>) -> Vec<GemPerpetualAssociatedAssetRow> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can we not export perpetual_associated_asset_rows ?

perpetual_associated_asset_rows is no longer exported: details() takes
the market's associated assets and returns their rows, like the
position row.
@gemdev111
gemdev111 merged commit 7f360d9 into main Oct 13, 2026
6 checks passed
@gemdev111
gemdev111 deleted the feature/perpetual-official-asset branch October 13, 2026 18:24
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