Skip to content

Commit 29e54de

Browse files
committed
Revert "Preserve polygon token metadata in transaction pay smoke"
This reverts commit 20ac05f.
1 parent 20ac05f commit 29e54de

1 file changed

Lines changed: 7 additions & 36 deletions

File tree

tests/smoke/confirmations/transactions/transaction-pay.spec.ts

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -93,27 +93,6 @@ async function testSpecificMock(mockServer: Mockttp) {
9393
}
9494

9595
async function mockPolygonTokenByAddress(mockServer: Mockttp) {
96-
const knownPolygonTokens: Record<
97-
string,
98-
{ symbol: string; decimals: number; name: string }
99-
> = {
100-
'0xc011a7e12a19f7b1f670d46f03b03f3342e82dfb': {
101-
symbol: 'pUSD',
102-
decimals: 6,
103-
name: 'Polymarket USD',
104-
},
105-
'0x3c499c542cef5e3811e1192ce70d8cc03d5c3359': {
106-
symbol: 'USDC',
107-
decimals: 6,
108-
name: 'USD Coin',
109-
},
110-
'0x2791bca1f2de4661ed88a30c99a7a9449aa84174': {
111-
symbol: 'USDC.e',
112-
decimals: 6,
113-
name: 'USD Coin (PoS)',
114-
},
115-
};
116-
11796
await mockServer
11897
.forGet('/proxy')
11998
.matching((request) => {
@@ -123,23 +102,15 @@ async function mockPolygonTokenByAddress(mockServer: Mockttp) {
123102
.thenCallback((request) => {
124103
const urlParam = new URL(request.url).searchParams.get('url') || '';
125104
const tokenUrl = new URL(urlParam);
126-
const address = (
127-
tokenUrl.searchParams.get('address') ?? ''
128-
).toLowerCase();
129-
const knownToken = knownPolygonTokens[address];
105+
const address = tokenUrl.searchParams.get('address') ?? '';
130106
return {
131107
statusCode: 200,
132-
json: knownToken
133-
? {
134-
address,
135-
...knownToken,
136-
}
137-
: {
138-
address,
139-
symbol: 'UNKNOWN',
140-
decimals: 18,
141-
name: 'Unknown Token',
142-
},
108+
json: {
109+
address: address.toLowerCase(),
110+
symbol: 'UNKNOWN',
111+
decimals: 18,
112+
name: 'Unknown Token',
113+
},
143114
};
144115
});
145116
}

0 commit comments

Comments
 (0)