swapTokenListFixture function

SwapTokenList swapTokenListFixture({
  1. List<SwapToken>? tokens,
  2. bool fresh = true,
})

A neutral SwapTokenList for IntoZec picker tests — two plausible source assets, fresh by default. Override fresh: false to model serve-stale, or tokens: const [] (fresh) to model the honest "no assets available" state.

Implementation

SwapTokenList swapTokenListFixture({
  List<SwapToken>? tokens,
  bool fresh = true,
}) {
  return SwapTokenList(
    tokens:
        tokens ??
        const [
          SwapToken(
            chain: 'eth',
            symbol: 'usdc',
            decimals: 6,
            providerAssetId: 'nep141:eth.usdc',
            priceUsd: 1.0,
          ),
          SwapToken(
            chain: 'btc',
            symbol: 'btc',
            decimals: 8,
            providerAssetId: 'nep141:btc',
            priceUsd: 65000.0,
          ),
        ],
    fresh: fresh,
  );
}