import { buildIso4217TokenListExtensions, resolveCoingeckoPriceProxyId } from './iso4217-token-metadata';

describe('iso4217-token-metadata', () => {
  it('maps cUSDC to USD Cash proxy and cUSDT to USD Treasury proxy', () => {
    expect(resolveCoingeckoPriceProxyId({ symbol: 'cUSDC', currencyCode: 'USD' })).toBe('usd-coin');
    expect(resolveCoingeckoPriceProxyId({ symbol: 'cUSDT', currencyCode: 'USD' })).toBe('tether');
  });

  it('builds ISO-4217 extensions for compliant fiat tokens', () => {
    const extensions = buildIso4217TokenListExtensions({
      symbol: 'cAUDC',
      currencyCode: 'AUD',
      type: 'base',
      name: 'Australian Dollar (Compliant)',
    });

    expect(extensions.iso4217).toBe('AUD');
    expect(extensions.gruAssetClass).toBe('C');
    expect(extensions.gruLayer).toBe('c');
  });
});
