mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-22 17:33:23 +01:00
UX: Remove Goerli buy link and disable button (#18137)
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
This commit is contained in:
parent
062a8b376f
commit
755b6b5667
@ -540,16 +540,13 @@ export const BUYABLE_CHAINS_MAP: {
|
||||
| typeof CHAIN_IDS.MOONRIVER
|
||||
| typeof CHAIN_IDS.AURORA
|
||||
| typeof CHAIN_IDS.LINEA_TESTNET
|
||||
| typeof CHAIN_IDS.GOERLI
|
||||
>]: BuyableChainSettings;
|
||||
} = {
|
||||
[CHAIN_IDS.MAINNET]: {
|
||||
nativeCurrency: CURRENCY_SYMBOLS.ETH,
|
||||
network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME,
|
||||
},
|
||||
[CHAIN_IDS.GOERLI]: {
|
||||
nativeCurrency: TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.GOERLI],
|
||||
network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME,
|
||||
},
|
||||
[CHAIN_IDS.SEPOLIA]: {
|
||||
nativeCurrency: TEST_NETWORK_TICKER_MAP[NETWORK_TYPES.SEPOLIA],
|
||||
network: BUYABLE_CHAIN_ETHEREUM_NETWORK_NAME,
|
||||
|
@ -26,24 +26,6 @@ describe('useRamps', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should open the buy crypto URL for GOERLI chain ID', () => {
|
||||
const mockChainId = '5';
|
||||
const mockBuyURI = 'https://goerli-faucet.slock.it/';
|
||||
|
||||
useSelector.mockReturnValue(mockChainId);
|
||||
const openTabSpy = jest.spyOn(global.platform, 'openTab');
|
||||
|
||||
const { result } = renderHook(() => useRamps());
|
||||
|
||||
expect(typeof result.current.openBuyCryptoInPdapp).toBe('function');
|
||||
|
||||
result.current.openBuyCryptoInPdapp();
|
||||
|
||||
expect(openTabSpy).toHaveBeenCalledWith({
|
||||
url: mockBuyURI,
|
||||
});
|
||||
});
|
||||
|
||||
it('should open the buy crypto URL for SEPOLIA chain ID', () => {
|
||||
const mockChainId = '10';
|
||||
const mockBuyURI = 'https://faucet.sepolia.dev/';
|
||||
|
@ -15,8 +15,6 @@ const useRamps = (): IUseRamps => {
|
||||
|
||||
const getBuyURI = useCallback((_chainId: ChainId) => {
|
||||
switch (_chainId) {
|
||||
case CHAIN_IDS.GOERLI:
|
||||
return 'https://goerli-faucet.slock.it/';
|
||||
case CHAIN_IDS.SEPOLIA:
|
||||
return 'https://faucet.sepolia.dev/';
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user