import { getChain138CashUsdTokenAddresses, isChain138CashUsdTokenAddress } from './chain138-cash-tokens';

describe('chain138 cash USD tokens', () => {
  it('includes canonical cUSDC, cUSDT, and official mirror stables', () => {
    const addresses = getChain138CashUsdTokenAddresses();
    expect(addresses.has('0xf22258f57794cc8e06237084b353ab30fffa640b')).toBe(true);
    expect(addresses.has('0x93e66202a11b1772e55407b32b44e5cd8eda7f22')).toBe(true);
    expect(addresses.has('0x71d6687f38b93ccad569fa6352c876eea967201b')).toBe(true);
    expect(addresses.has('0x004b63a7b5b0e06f6bb6adb4a5f9f590bf3182d1')).toBe(true);
    expect(addresses.has('0xe94260c555ac1d9d3cc9e1632883452ebdf0082e')).toBe(false);
  });

  it('detects cash token membership case-insensitively', () => {
    expect(isChain138CashUsdTokenAddress('0xF22258f57794CC8E06237084b353Ab30fFfa640b')).toBe(true);
    expect(isChain138CashUsdTokenAddress('0xe94260c555ac1d9d3cc9e1632883452ebdf0082e')).toBe(false);
  });
});
