Skip to content

Commit

Permalink
add uniswap for arbitrum
Browse files Browse the repository at this point in the history
Since arbitrum class inherits from L1 class, by removing the custom
payment method integration, arbitrum now uses the same payment choices
as L1 (which includes uniswap)
  • Loading branch information
rahul-kothari committed May 3, 2022
1 parent 917b65b commit 98d8760
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions pretix_eth/network/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,38 +332,6 @@ class Arbitrum(L1):
CHAIN_ID = 42161
NETWORK_UNISWAP_NAME = "arbitrum"

def payment_instructions(
self, wallet_address, payment_amount, amount_in_token_base_unit
):
"""
Generic instructions for paying on all Arbitrum networks (eg Rinkeby and Mainnet),
both for native tokens and custom tokens.
Pay via a web3 modal, ERC 681 (QR Code) or manually.
"""
erc_681_url = make_erc_681_url(
to_address=wallet_address,
payment_amount=payment_amount,
chain_id=self.CHAIN_ID,
is_token=not self.IS_NATIVE_ASSET,
token_address=self.ADDRESS,
)
amount_manual = f"{amount_in_token_base_unit} {self.TOKEN_SYMBOL}"
web3modal_url = make_checkout_web3modal_url(
currency_type=self.TOKEN_SYMBOL,
amount_in_ether_or_token=amount_in_token_base_unit,
wallet_address=wallet_address,
chainId=self.CHAIN_ID,
)

return {
"erc_681_url": erc_681_url,
# "uniswap_url": None,
"web3modal_url": web3modal_url,
"amount_manual": amount_manual,
"wallet_address": wallet_address,
}


class RinkebyArbitrum(Arbitrum):
"""
Expand Down

0 comments on commit 98d8760

Please sign in to comment.