diff --git a/.gitignore b/.gitignore index bfe52c3..48709f4 100644 --- a/.gitignore +++ b/.gitignore @@ -27,4 +27,6 @@ public/compound-components/ # IPFS release file .release -.release-notes \ No newline at end of file +.release-notes +# Local Netlify folder +.netlify diff --git a/config/env/development.json b/config/env/development.json index 83d746e..32818e5 100644 --- a/config/env/development.json +++ b/config/env/development.json @@ -13,7 +13,7 @@ "rinkeby": "https://infura.io/rinkeby", "kovan": "https://infura.io/kovan", "ropsten": "https://infura.io/ropsten", - "mainnet": "https://infura.io/mainnet" + "mainnet": "https://mainnet.infura.io/v3/dc6607314ecd4fab97514370c623259a" }, "NETWORK_MAP": { "mainnet": 1, @@ -24,5 +24,5 @@ "development": 999 }, "DEFAULT_NETWORK": "mainnet", - "BLOCKNATIVE_API_KEY": null + "BLOCKNATIVE_API_KEY": "70a5e5a7-09ac-45e5-9dd7-4bfc804038ed" } diff --git a/config/env/production.json b/config/env/production.json index 0ee58b1..f92c1f7 100644 --- a/config/env/production.json +++ b/config/env/production.json @@ -12,7 +12,7 @@ "rinkeby": "https://infura.io/rinkeby", "kovan": "https://infura.io/kovan", "ropsten": "https://infura.io/ropsten", - "mainnet": "https://infura.io/mainnet" + "mainnet": "https://mainnet.infura.io/v3/dc6607314ecd4fab97514370c623259a" }, "NETWORK_MAP": { "mainnet": 1, @@ -22,5 +22,5 @@ "kovan": 42 }, "DEFAULT_NETWORK": "mainnet", - "BLOCKNATIVE_API_KEY": null + "BLOCKNATIVE_API_KEY": "70a5e5a7-09ac-45e5-9dd7-4bfc804038ed" } diff --git a/package.json b/package.json index 130d05d..8a62c29 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@babel/runtime": "^7.9.2", "@babel/runtime-corejs3": "^7.10.2", "@material/switch": "^3.0.0", + "@unstoppabledomains/resolution": "^8.2.0", "assets-webpack-plugin": "^3.5.1", "autoprefixer": "^9.7.6", "babel-loader": "^8.0.0", diff --git a/src/elm/Admin.elm b/src/elm/Admin.elm index 9a917d5..536e840 100644 --- a/src/elm/Admin.elm +++ b/src/elm/Admin.elm @@ -468,7 +468,7 @@ timelockView configs abiFilesRaw account maybeNetwork timezone maybeCurrentTime actionButton = case ( account, maybeNetworkConfig ) of - ( Acct adminAddress _, Just config ) -> + ( Acct adminAddress _ _ , Just config ) -> case config.maybeTimelock of Just timelock -> case ( model.maybeTarget, model.maybeFunction, model.maybeDataArg ) of @@ -638,7 +638,7 @@ timelockView configs abiFilesRaw account maybeNetwork timezone maybeCurrentTime ( Just time, Just eta ) -> if CompoundComponents.Utils.Time.posixToSeconds time > eta then case ( account, maybeNetworkConfig ) of - ( Acct adminAddress _, Just config ) -> + ( Acct adminAddress _ _ , Just config ) -> case config.maybeTimelock of Just timelock -> button diff --git a/src/elm/Balances.elm b/src/elm/Balances.elm index 5d31e20..76d0f2f 100644 --- a/src/elm/Balances.elm +++ b/src/elm/Balances.elm @@ -127,7 +127,7 @@ getUnderlyingTotalsInUsd compoundState cTokens oracleState = getWalletBalanceNonSafeEther : Config -> Account -> CompoundState -> CToken -> Maybe Decimal getWalletBalanceNonSafeEther config account compoundState cToken = case ( Eth.Token.isCEtherToken config cToken, account ) of - ( True, Acct customerAddress etherBalance ) -> + ( True, Acct customerAddress etherBalance _ ) -> etherBalance _ -> @@ -138,7 +138,7 @@ getWalletBalanceNonSafeEther config account compoundState cToken = getWalletBalanceSafeEther : Config -> Account -> CompoundState -> CToken -> Maybe Decimal getWalletBalanceSafeEther config account compoundState cToken = case ( Eth.Token.isCEtherToken config cToken, account ) of - ( True, Acct customerAddress etherBalance ) -> + ( True, Acct customerAddress etherBalance _ ) -> case ( Decimal.fromFloat 0.005, etherBalance ) of ( Just etherMaxAdjustment, Just actualEtherBalance ) -> Decimal.sub actualEtherBalance etherMaxAdjustment diff --git a/src/elm/DappInterface/BorrowingPane.elm b/src/elm/DappInterface/BorrowingPane.elm index 3128878..37962b0 100644 --- a/src/elm/DappInterface/BorrowingPane.elm +++ b/src/elm/DappInterface/BorrowingPane.elm @@ -103,7 +103,7 @@ borrowedListOrAllMarketsPanel maybeConfig maybeEtherUsdPrice ({ account, userLan in if areAllAssetsLoaded model then case ( maybeConfig, account ) of - ( Just config, Acct customerAddress maybeEtherBalance ) -> + ( Just config, Acct customerAddress maybeEtherBalance _ ) -> if List.length borrowedAssets > 0 then section [ class "asset-list" ] [ columnLabels @@ -186,7 +186,7 @@ allMarketsListPanel maybeConfig maybeEtherUsdPrice ({ account, compoundState, pr getReadyBorrowedAssets model True in case ( maybeConfig, account ) of - ( Just config, Acct _ _ ) -> + ( Just config, Acct _ _ _ ) -> if List.length borrowedAndReadyAssets == 0 then text "" @@ -237,7 +237,7 @@ getAllMarketsPanelContent config maybeEtherUsdPrice addPanelClass allBorrowableA [ class "asset-list" ] in case account of - Acct customerAddress maybeEtherBalance -> + Acct customerAddress maybeEtherBalance _ -> div parentDivAttributes [ columnLabels , div [ class "assets" ] @@ -293,7 +293,7 @@ borrowedAssetRow isAllMarketsRow config ( maybeCustomerAddress, maybeEtherBalanc maybeCustomerAddress |> Maybe.map (\customerAddress -> - Balances.getWalletBalanceNonSafeEther config (Acct customerAddress maybeEtherBalance) compoundState cToken + Balances.getWalletBalanceNonSafeEther config (Acct customerAddress maybeEtherBalance Nothing ) compoundState cToken ) |> Functions.demaybeify |> Maybe.withDefault Decimal.zero diff --git a/src/elm/DappInterface/ClaimCompModal.elm b/src/elm/DappInterface/ClaimCompModal.elm index 1d39572..47427e1 100644 --- a/src/elm/DappInterface/ClaimCompModal.elm +++ b/src/elm/DappInterface/ClaimCompModal.elm @@ -85,7 +85,7 @@ updateClaimModalStep newStep oldState = handleTransactionUpdate : Maybe Config -> Maybe Network -> Account -> TransactionState -> TransactionMsg -> Model -> Model handleTransactionUpdate maybeConfig maybeNetwork account transactionState transactionMsg model = case ( maybeConfig, maybeNetwork, account ) of - ( Just config, Just actualNetwork, Acct customer _ ) -> + ( Just config, Just actualNetwork, Acct customer _ _ ) -> case transactionMsg of Eth.Transaction.NewTransaction transaction -> if @@ -150,7 +150,7 @@ update internalMsg maybeConfig account compoundState model = case internalMsg of ClaimCompClicked estimateComp -> case ( maybeConfig, account ) of - ( Just config, Acct customer _ ) -> + ( Just config, Acct customer _ _ ) -> let marketsWithBalances = Dict.toList compoundState.balances @@ -193,7 +193,7 @@ update internalMsg maybeConfig account compoundState model = view : Translations.Lang -> Maybe Config -> Maybe Network -> Account -> TokenState -> OracleState -> TransactionState -> GovernanceState -> Preferences -> Model -> Html Msg view userLanguage maybeConfig maybeNetwork account tokenState oracleState transactionState governanceState preferences model = case ( account, maybeNetwork ) of - ( Acct accountAddress _, Just network ) -> + ( Acct accountAddress _ _ , Just network ) -> let maybeEtherUsdPrice = maybeConfig diff --git a/src/elm/DappInterface/CollateralPane.elm b/src/elm/DappInterface/CollateralPane.elm index e4ca523..dcd8e5f 100644 --- a/src/elm/DappInterface/CollateralPane.elm +++ b/src/elm/DappInterface/CollateralPane.elm @@ -101,7 +101,7 @@ collateralListOrAllMarketsPanel maybeConfig maybeEtherUsdPrice ({ account, userL in if areAllAssetsLoaded model then case ( maybeConfig, account ) of - ( Just config, Acct customerAddress maybeEtherBalance ) -> + ( Just config, Acct customerAddress maybeEtherBalance _ ) -> if List.length suppliedAndReadyCollateralAssets > 0 then section [ class "asset-list" ] [ columnLabels @@ -187,7 +187,7 @@ allMarketsListPanel maybeConfig maybeEtherUsdPrice ({ account, compoundState, pr getReadyCollateralAssets model True in case ( maybeConfig, account ) of - ( Just config, Acct _ _ ) -> + ( Just config, Acct _ _ _ ) -> if List.length suppliedAndReadyCollateralAssets == 0 then text "" @@ -238,7 +238,7 @@ getAllMarketsPanelContent config maybeEtherUsdPrice addPanelClass allReadyCollat [ class "asset-list" ] in case account of - Acct customerAddress maybeEthBalance -> + Acct customerAddress maybeEthBalance _ -> div parentDivAttributes [ columnLabels , div [ class "assets" ] @@ -261,7 +261,7 @@ getAllMarketsPanelContent config maybeEtherUsdPrice addPanelClass allReadyCollat collateralAssetRow : Bool -> Config -> ( Maybe CustomerAddress, Maybe Decimal ) -> Maybe Decimal -> Model -> ReadyCollateralAsset -> Html Msg -collateralAssetRow isAllMarketsRow config ( maybeCustomerAddress, maybeEtherBalance ) maybeEtherUsdPrice { compoundState, tokenState, preferences, userLanguage } { cToken, supplyBalance, tokenValueUsd, maybeSupplyInterestEarned, supplyInterestRate } = +collateralAssetRow isAllMarketsRow config ( maybeCustomerAddress, maybeEtherBalance) maybeEtherUsdPrice { compoundState, tokenState, preferences, userLanguage } { cToken, supplyBalance, tokenValueUsd, maybeSupplyInterestEarned, supplyInterestRate } = let supplyBalanceUsd = Decimal.mul supplyBalance tokenValueUsd @@ -270,7 +270,7 @@ collateralAssetRow isAllMarketsRow config ( maybeCustomerAddress, maybeEtherBala maybeCustomerAddress |> Maybe.map (\customerAddress -> - Balances.getWalletBalanceNonSafeEther config (Acct customerAddress maybeEtherBalance) compoundState cToken + Balances.getWalletBalanceNonSafeEther config (Acct customerAddress maybeEtherBalance Nothing) compoundState cToken ) |> Functions.demaybeify |> Maybe.withDefault Decimal.zero diff --git a/src/elm/DappInterface/CollateralToggleModal.elm b/src/elm/DappInterface/CollateralToggleModal.elm index 342c3e3..b197a14 100644 --- a/src/elm/DappInterface/CollateralToggleModal.elm +++ b/src/elm/DappInterface/CollateralToggleModal.elm @@ -167,7 +167,7 @@ view mainModel = |> Maybe.andThen (\config -> Eth.Oracle.getEtherPrice config mainModel.tokenState mainModel.oracleState) in case ( ( maybeConfig, mainModel.network ), ( mainModel.account, mainModel.collateralToggleModalState ) ) of - ( ( Just config, Just actualNetwork ), ( Acct customerAddress _, Just visibleCollateralModalState ) ) -> + ( ( Just config, Just actualNetwork ), ( Acct customerAddress _ _ , Just visibleCollateralModalState ) ) -> div [ class "collateral-toggle modal" ] [ div [ class "cover active", onClick (ForParent DismissAndResetCollateralModal) ] [] , div [ class "container-small" ] @@ -502,7 +502,7 @@ getMostRecentAssetPendingTransaction config { chosenAsset } { currentTime, netwo -- Any transaction for the asset will block the whole input view. pendingAssetTransactions = case ( network, account ) of - ( Just actualNetwork, Acct customerAddress _ ) -> + ( Just actualNetwork, Acct customerAddress _ _ ) -> Eth.Transaction.filteredTransactionsByCToken pendingRecentTransactions config actualNetwork customerAddress tokenState.cTokens chosenAsset _ -> diff --git a/src/elm/DappInterface/CommonViews.elm b/src/elm/DappInterface/CommonViews.elm index 458813b..8c37073 100644 --- a/src/elm/DappInterface/CommonViews.elm +++ b/src/elm/DappInterface/CommonViews.elm @@ -10,6 +10,7 @@ module DappInterface.CommonViews exposing , pageHeader , translator , update + ) import CompoundComponents.DisplayCurrency exposing (DisplayCurrency(..)) @@ -115,14 +116,18 @@ pageHeader userLanguage page connectedWallet account preferences governanceState let accountAddress = case account of - UnknownAcct -> - "" + UnknownAcct -> + "" - NoAccount -> - Translations.no_account userLanguage + NoAccount -> + Translations.no_account userLanguage - Acct (Customer customerAddress) _ -> - shortenedAddressString 2 4 customerAddress + Acct (Customer customerAddress) _ unsDomain -> + case unsDomain of + Nothing -> + shortenedAddressString 2 4 customerAddress + Just domain -> + domain connectedWalletIconClass = case connectedWallet.selectedProvider of @@ -139,10 +144,9 @@ pageHeader userLanguage page connectedWallet account preferences governanceState "" accountButton = - if connectedWallet.selectedProvider == Nothing || connectedWallet.selectedProvider == Just EthConnectedWallet.None then + if (connectedWallet.selectedProvider == Nothing || connectedWallet.selectedProvider == Just EthConnectedWallet.None) then a [ id "connect-wallet", class "dapp button hollow", onClick (ForParent AccountAddressClicked) ] [ text (Translations.connect_wallet userLanguage) ] - else a [ id "account", onClick (ForParent AccountAddressClicked) ] [ span [ class connectedWalletIconClass ] [] @@ -189,6 +193,7 @@ pageHeader userLanguage page connectedWallet account preferences governanceState , div [ class "col-xs-9 col-sm-3 text-right actions" ] [ compBalanceView account governanceState , accountButton + , text "" ] , div [ class "col-xs-9 mobile-links actions" ] mobileLinks ] @@ -251,7 +256,7 @@ compBalanceView account governanceState = ] in case account of - Acct customer _ -> + Acct customer _ _ -> case ( getCompoundGovernanceTokenBalance customer governanceState, getCompAccruedBalance customer governanceState ) of ( Just balance, Just accrued ) -> let diff --git a/src/elm/DappInterface/Container.elm b/src/elm/DappInterface/Container.elm index 5a2657f..43042b6 100644 --- a/src/elm/DappInterface/Container.elm +++ b/src/elm/DappInterface/Container.elm @@ -285,7 +285,7 @@ view mainModel = else case account of - Acct (Customer _) maybeBalance -> + Acct (Customer _) maybeBalance _ -> let hasZeroEthBalance = case maybeBalance of diff --git a/src/elm/DappInterface/MainModel.elm b/src/elm/DappInterface/MainModel.elm index 6fdd01d..e801cb6 100644 --- a/src/elm/DappInterface/MainModel.elm +++ b/src/elm/DappInterface/MainModel.elm @@ -162,6 +162,7 @@ type alias Model = , maybeGasPrice : Maybe Decimal , userLanguage : Translations.Lang , repl : Repl.Model + , unsDomains: Dict String String } diff --git a/src/elm/DappInterface/PrimaryActionModal.elm b/src/elm/DappInterface/PrimaryActionModal.elm index d70700b..805c678 100644 --- a/src/elm/DappInterface/PrimaryActionModal.elm +++ b/src/elm/DappInterface/PrimaryActionModal.elm @@ -625,7 +625,7 @@ enableAssetView userLanguage config maybeEtherUsdPrice ({ chosenAsset, primaryAc " borrow" in case ( mainModel.network, mainModel.account ) of - ( Just network, Acct customerAddress _ ) -> + ( Just network, Acct customerAddress _ _ ) -> let enableClickAction = Eth.Token.FaucetTokenApprove @@ -927,7 +927,7 @@ getSubmitButton userLanguage config ({ chosenAsset, inputValue, primaryActionTyp actionConstructor panelMessage amount = case ( mainModel.network, mainModel.account ) of - ( Just actualNetwork, Acct customerAddress _ ) -> + ( Just actualNetwork, Acct customerAddress _ _ ) -> WrappedCompoundMsg <| Eth.Compound.Web3TransactionMsg <| panelMessage actualNetwork chosenAsset.contractAddress chosenAsset.underlying.decimals customerAddress amount _ -> @@ -936,7 +936,7 @@ getSubmitButton userLanguage config ({ chosenAsset, inputValue, primaryActionTyp redeemConstructor panelMessage amount = case ( mainModel.network, mainModel.account, Dict.get (Ethereum.getContractAddressString chosenAsset.contractAddress) mainModel.compoundState.cTokensMetadata ) of - ( Just actualNetwork, Acct customerAddress _, Just cTokenMetadata ) -> + ( Just actualNetwork, Acct customerAddress _ _, Just cTokenMetadata ) -> WrappedCompoundMsg <| Eth.Compound.Web3TransactionMsg <| panelMessage actualNetwork chosenAsset.contractAddress cTokenMetadata.exchangeRate chosenAsset.decimals chosenAsset.underlying.decimals customerAddress amount _ -> @@ -1164,7 +1164,7 @@ bottomBalanceView userLanguage config { chosenAsset, primaryActionType } mainMod faucetAllocateButton : Config -> Model -> CToken -> Html Msg faucetAllocateButton config { account, network, userLanguage } chosenAsset = case ( network, account, config.maybeFauceteer ) of - ( Just actualNetwork, Acct customerAddress _, Just fauceteerAddress ) -> + ( Just actualNetwork, Acct customerAddress _ _, Just fauceteerAddress ) -> if config.cEtherToken.address /= chosenAsset.contractAddress && actualNetwork /= Network.MainNet then a [ class "faucet-link", onClick <| WrappedTokenMsg <| Eth.Token.Web3TransactionMsg (Eth.Token.FauceteerDrip actualNetwork fauceteerAddress chosenAsset.contractAddress chosenAsset.underlying.assetAddress customerAddress) ] [ text (Translations.faucet userLanguage) ] @@ -1172,7 +1172,7 @@ faucetAllocateButton config { account, network, userLanguage } chosenAsset = else text "" - ( Just actualNetwork, Acct customerAddress _, Nothing ) -> + ( Just actualNetwork, Acct customerAddress _ _, Nothing ) -> if (config.cEtherToken.address /= chosenAsset.contractAddress && actualNetwork /= Network.MainNet) && not (actualNetwork == Network.Kovan && (chosenAsset.symbol == "cSAI" || chosenAsset.symbol == "cDAI")) @@ -1202,7 +1202,7 @@ getMostRecentAssetPendingTransaction config { chosenAsset } { currentTime, netwo -- Any transaction for the asset will block the whole input view. pendingAssetTransactions = case ( network, account ) of - ( Just actualNetwork, Acct customerAddress _ ) -> + ( Just actualNetwork, Acct customerAddress _ _ ) -> Eth.Transaction.filteredTransactionsByCToken pendingRecentTransactions config actualNetwork customerAddress tokenState.cTokens chosenAsset _ -> @@ -1243,7 +1243,7 @@ getAvailableTokensForAction maybeConfig { chosenAsset, primaryActionType } { acc ( supplyBalance, borrowBalance ) = case account of - Acct _ _ -> + Acct _ _ _ -> ( Maybe.map .underlyingSupplyBalance underlyingBalances |> Maybe.withDefault Decimal.zero , Maybe.map .underlyingBorrowBalance underlyingBalances diff --git a/src/elm/DappInterface/Propose.elm b/src/elm/DappInterface/Propose.elm index 22469c8..a943ac5 100644 --- a/src/elm/DappInterface/Propose.elm +++ b/src/elm/DappInterface/Propose.elm @@ -426,7 +426,7 @@ governanceView userLanguage isCrowdProposal config ( governorAddress, isBravo ) proposalActionButton = case account of - Acct adminAddress _ -> + Acct adminAddress _ _ -> case ( model.maybeProposalTitle, List.length model.actions > 0 ) of ( Just _, True ) -> case ( isCrowdProposal, maybeCrowdFactoryAddress ) of diff --git a/src/elm/DappInterface/Vote.elm b/src/elm/DappInterface/Vote.elm index bcc93fb..557b30b 100644 --- a/src/elm/DappInterface/Vote.elm +++ b/src/elm/DappInterface/Vote.elm @@ -259,7 +259,7 @@ handleShouldLoadCurrentDelegatee apiBaseUrlMap maybeNetwork account governanceSt let maybeRequestCurrentDelegateeUrl = case ( requestCurrentDelegatee, maybeNetwork, account ) of - ( True, Just network, Acct customer _ ) -> + ( True, Just network, Acct customer _ _ ) -> case getDelegatedAddress customer governanceState of Just (Delegatee (Customer delegateeAddressString)) -> { addresses = [ delegateeAddressString ] @@ -373,7 +373,7 @@ getPendingApproveCAPTransaction config network customer transactionState = handleTransactionUpdate : Maybe Config -> Maybe Network -> Account -> TransactionState -> TransactionMsg -> Model -> Model handleTransactionUpdate maybeConfig maybeNetwork account transactionState transactionMsg model = case ( maybeConfig, maybeNetwork, account ) of - ( Just config, Just actualNetwork, Acct customer _ ) -> + ( Just config, Just actualNetwork, Acct customer _ _ ) -> case transactionMsg of Eth.Transaction.NewTransaction transaction -> if transaction.function == "approve" then @@ -436,7 +436,7 @@ update internalMsg maybeConfig maybeNetwork apiBaseUrlMap account model = VoteDashboardDataResult data -> case ( maybeNetwork, account ) of - ( Just network, Acct (Customer voter) _ ) -> + ( Just network, Acct (Customer voter) _ _ ) -> if String.toLower (networkName network) == data.network && voter == data.voter then let isCompletedState : List ProposalState -> Bool @@ -595,7 +595,7 @@ update internalMsg maybeConfig maybeNetwork apiBaseUrlMap account model = case voteModalState of ConfirmVoteType proposal voteType reason -> case ( maybeConfig, account ) of - ( Just config, Acct accountAddress _ ) -> + ( Just config, Acct accountAddress _ _ ) -> case config.maybeGovernor of Just ( governorAddress, isBravo ) -> voteProposal accountAddress (getContractAddressString governorAddress) isBravo proposal.id voteType reason @@ -662,7 +662,7 @@ update internalMsg maybeConfig maybeNetwork apiBaseUrlMap account model = case maybeConfig of Just config -> case ( config.maybeCompToken, account ) of - ( Just comp, Acct accountAddress _ ) -> + ( Just comp, Acct accountAddress _ _ ) -> let isValidDelegate = isValidAddress delegateAddress @@ -730,7 +730,7 @@ view userLanguage maybeConfig maybeNetwork timezone maybeCurrentTime account tra let { headerView, walletPanel, proposalsPanelView, votingModalView, delegateModalView, approveCAPModalView } = case ( maybeConfig, account, maybeNetwork ) of - ( Just config, Acct accountAddress _, Just network ) -> + ( Just config, Acct accountAddress _ _ , Just network ) -> case config.maybeCompToken of Just _ -> let @@ -1745,7 +1745,7 @@ voteProposalRow userLanguage timezone maybeCurrentTime config network account mo Just Succeeded -> case ( config.maybeGovernor, account ) of - ( Just governor, Acct customer _ ) -> + ( Just governor, Acct customer _ _ ) -> div [ class "button main proposal__queue-execute-button", onClickStopPropagation (WrappedGovernanceMsg (Eth.Governance.QueueProposal governor customer proposal.id)) ] [ text (Translations.queue userLanguage) ] @@ -1758,7 +1758,7 @@ voteProposalRow userLanguage timezone maybeCurrentTime config network account mo proposal.states |> List.reverse |> List.head in case ( config.maybeGovernor, account, maybeRawProposalState ) of - ( Just governor, Acct customer _, Just rawProposalState ) -> + ( Just governor, Acct customer _ _ , Just rawProposalState ) -> case ( maybeCurrentTime, rawProposalState.end_time ) of ( Just time, Just endTime ) -> if CompoundComponents.Utils.Time.posixToSeconds time > CompoundComponents.Utils.Time.posixToSeconds endTime then @@ -1893,7 +1893,7 @@ getVoteDashboardData configs maybeNetwork maybeCurrentBlockNumber account = getTrxsCmd = case ( Dict.get nameOfNetwork configs, account, maybeCurrentBlockNumber ) of - ( Just config, Acct (Customer voter) _, Just currentBlockNumber ) -> + ( Just config, Acct (Customer voter) _ _ , Just currentBlockNumber ) -> case ( config.maybeGovernor, config.maybeCompToken ) of ( Just ( governorAddress, isBravo ), Just comp ) -> let diff --git a/src/elm/Eth/Compound.elm b/src/elm/Eth/Compound.elm index 188361c..ab169ff 100644 --- a/src/elm/Eth/Compound.elm +++ b/src/elm/Eth/Compound.elm @@ -200,7 +200,7 @@ compoundNewBlockCmd blockNumber apiBaseUrlMap network comptroller account config accountRequiredCmds = case account of - Acct customerAddress _ -> + Acct customerAddress _ _ -> [ askCustomerBalances apiBaseUrlMap (Just network) blockNumber customerAddress cTokenConfigs config.compoundLens , askAccountLimits blockNumber comptroller customerAddress config.compoundLens ] @@ -210,6 +210,7 @@ compoundNewBlockCmd blockNumber apiBaseUrlMap network comptroller account config NoAccount -> [] + in Cmd.batch <| askCTokenMetadata blockNumber config cTokenConfigs diff --git a/src/elm/Eth/Governance.elm b/src/elm/Eth/Governance.elm index ab082ae..a85e642 100644 --- a/src/elm/Eth/Governance.elm +++ b/src/elm/Eth/Governance.elm @@ -89,7 +89,7 @@ newBlockCmd config blockNumber maybeAccount maybeBrowsedAddress = let userBalCmd = case maybeAccount of - Acct account _ -> + Acct account _ _ -> [ askGovernanceData blockNumber config.compoundLens compToken.address account compToken.decimals ] ++ (if config.maybeReservoir /= Nothing then diff --git a/src/elm/Eth/Transaction.elm b/src/elm/Eth/Transaction.elm index 959fec1..e937817 100644 --- a/src/elm/Eth/Transaction.elm +++ b/src/elm/Eth/Transaction.elm @@ -446,14 +446,14 @@ getPendingTransactionsForAccount maybeNetwork account maybeOldestTrxTimestamp ma pendingBNTransactions ++ transactions in case ( maybeNetwork, account, maybeOldestTrxTimestamp ) of - ( Just network, Acct customerAddress _, Just oldestTrxTimeStamp ) -> + ( Just network, Acct customerAddress _ _ , Just oldestTrxTimeStamp ) -> allPendingTransactions |> List.filter (.status >> (==) Pending) |> List.filter (.network >> (==) network) |> List.filter (.customer >> (==) customerAddress) |> List.filter (\trx -> Time.posixToMillis trx.timestamp >= Time.posixToMillis oldestTrxTimeStamp) - ( Just network, Acct customerAddress _, Nothing ) -> + ( Just network, Acct customerAddress _ _ , Nothing ) -> allPendingTransactions |> List.filter (.status >> (==) Pending) |> List.filter (.network >> (==) network) diff --git a/src/elm/Liquidate.elm b/src/elm/Liquidate.elm index e0d5ec2..4f9211a 100644 --- a/src/elm/Liquidate.elm +++ b/src/elm/Liquidate.elm @@ -220,7 +220,7 @@ buildLiquidateRequestCmd config account cTokens liquidateDetails msg = let maybeDappUserAddress = case account of - Ethereum.Acct customerAddress _ -> + Ethereum.Acct customerAddress _ _ -> Just customerAddress _ -> @@ -904,7 +904,7 @@ recentActivityView userLanguage timezone transactions maybeNetwork account cToke let filteredTransactions = case ( maybeNetwork, account ) of - ( Just network, Acct customerAccount _ ) -> + ( Just network, Acct customerAccount _ _ ) -> transactions |> List.filter (\transaction -> diff --git a/src/elm/Main.elm b/src/elm/Main.elm index 0f13b47..1341687 100644 --- a/src/elm/Main.elm +++ b/src/elm/Main.elm @@ -10,7 +10,7 @@ import CompoundApi.GasService.Urls import CompoundComponents.Console as Console import CompoundComponents.DisplayCurrency exposing (DisplayCurrency(..)) import CompoundComponents.Eth.ConnectedEthWallet as ConnectedEthWallet exposing (tryConnect) -import CompoundComponents.Eth.Ethereum as Ethereum exposing (Account(..), AssetAddress(..), ContractAddress(..), CustomerAddress(..)) +import CompoundComponents.Eth.Ethereum as Ethereum exposing (Account(..), AssetAddress(..), ContractAddress(..), CustomerAddress(..), getCustomerAddressString) import CompoundComponents.Eth.Ledger exposing (LedgerAccount(..)) import CompoundComponents.Eth.Network as Network exposing (Network(..), networkId, networkName) import CompoundComponents.Ether.BNTransaction as BNTransaction exposing (BNTransactionMsg) @@ -42,7 +42,7 @@ import Http import Json.Decode import Json.Encode import Liquidate -import Port exposing (askNetwork, askNewBlock, askSetBlockNativeNetworkPort, giveAccountBalance, giveError, giveNewBlock, setGasPrice, setTitle) +import Port exposing (askNetwork, askNewBlock, askSetBlockNativeNetworkPort, giveAccountBalance, giveError, giveNewBlock, setGasPrice, setTitle, sendUNSAddress, receiveUNSAddress) import Preferences exposing (PreferencesMsg(..), preferencesInit, preferencesSubscriptions, preferencesUpdate) import Repl import Strings.Translations as Translations @@ -87,6 +87,7 @@ type Msg | CheckVersion Time.Posix | CheckedVersion (Result Http.Error Float) | RefreshGasPrice (Result Http.Error CompoundApi.GasService.Models.API_GasPriceResponse) + | ReceiveUNSDomain (String, String) type alias Flags = @@ -282,6 +283,7 @@ init { path, configurations, configAbiFiles, dataProviders, apiBaseUrlMap, userA , maybeGasPrice = Nothing , userLanguage = initPreferences.userLanguage , repl = Repl.emptyState + , unsDomains = Dict.empty } , Cmd.batch [ setTitle (getPageTitle initPreferences.userLanguage initialPage) @@ -332,7 +334,7 @@ newBlockCmd apiBaseUrlMap maybeNetwork blockNumber previousBlockNumber ({ dataPr compAllowanceCmd = case ( config.maybeCompToken, config.maybeCrowdProposalFactory, model.account ) of - ( Just compToken, Just capFactory, Acct customerAddress _ ) -> + ( Just compToken, Just capFactory, Acct customerAddress _ _ ) -> Cmd.map WrappedTokenMsg (Eth.Token.askCompCapFactoryAllowance blockNumber customerAddress capFactory compToken.address) _ -> @@ -427,16 +429,15 @@ handleUpdatesFromEthConnectedWallet maybeConfig connectedEthWalletMsg model = let -- If this is an account switching and we have an existing block and network we want to clear some -- internal models and trigger a newBlockCmd to refresh everything immediately. - ( isAccountSwitch, updatedModelFromSetAccount ) = + ( isAccountSwitch, updatedModelFromSetAccount ) = let newAccountModel = - { model | account = Acct newAccount Nothing } + { model | account = Acct newAccount Nothing (Dict.get (Ethereum.getCustomerAddressString newAccount) model.unsDomains) } in case ( model.account, model.blockNumber ) of - ( Acct existingAccount _, Just currentBlockNumber ) -> + ( Acct existingAccount _ _, Just currentBlockNumber ) -> if Ethereum.getCustomerAddressString existingAccount /= Ethereum.getCustomerAddressString newAccount then ( True, { newAccountModel | compoundState = clearCompoundState model.compoundState, tokenState = clearTokenState model.tokenState } ) - else ( False, newAccountModel ) @@ -490,6 +491,15 @@ handleUpdatesFromEthConnectedWallet maybeConfig connectedEthWalletMsg model = _ -> Cmd.none + sendAddress = + let unsDomain = Dict.get (Ethereum.getCustomerAddressString newAccount) model.unsDomains + in + case unsDomain of + Nothing -> + sendUNSAddress (Ethereum.getCustomerAddressString newAccount ) + Just _ -> + Cmd.none + ( updatedRepl, replCmd ) = Repl.update (Repl.SetAccount newAccount) model.repl @@ -498,6 +508,7 @@ handleUpdatesFromEthConnectedWallet maybeConfig connectedEthWalletMsg model = [ syncBlockCmd , Cmd.map replTranslator replCmd , pageCmd + , sendAddress ] in ( { updatedModelFromSetAccount @@ -535,7 +546,7 @@ handleUpdatesFromEthConnectedWallet maybeConfig connectedEthWalletMsg model = update : Msg -> Model -> ( Model, Cmd Msg ) -update msg ({ page, configs, apiBaseUrlMap, account, transactionState, bnTransactionState, tokenState, compoundState, oracleState, network } as model) = +update msg ({ page, configs, apiBaseUrlMap, account, transactionState, bnTransactionState, tokenState, compoundState, oracleState, network, unsDomains } as model) = let maybeConfig = getCurrentConfig model @@ -643,7 +654,7 @@ update msg ({ page, configs, apiBaseUrlMap, account, transactionState, bnTransac nextModalStep = case ( network, account ) of - ( Just actualNetwork, Acct customer _ ) -> + ( Just actualNetwork, Acct customer _ _ ) -> case ClaimCompModal.getPendingClaimCompTransaction actualNetwork customer transactionState of Just _ -> ClaimCompModal.AwaitingClaimTransactionMined @@ -740,8 +751,8 @@ update msg ({ page, configs, apiBaseUrlMap, account, transactionState, bnTransac SetAccountBalance balance -> case model.account of - Acct account_ _ -> - ( { model | account = Acct account_ (Just balance) }, Cmd.none ) + Acct account_ _ domain -> + ( { model | account = Acct account_ (Just balance) domain }, Cmd.none ) _ -> ( model, Cmd.none ) @@ -1119,6 +1130,17 @@ update msg ({ page, configs, apiBaseUrlMap, account, transactionState, bnTransac Error error -> ( { model | errors = model.errors }, Console.log error ) + ReceiveUNSDomain (domainOwner,domain) -> + + case account of + Acct customerAddress maybeDecimal _ -> + if Ethereum.getCustomerAddressString customerAddress == domainOwner then + ( {model | account = Acct customerAddress maybeDecimal (Just domain), unsDomains = Dict.insert domainOwner domain model.unsDomains}, Cmd.none) + else + ( {model | unsDomains = Dict.insert domainOwner domain model.unsDomains}, Cmd.none) + _ -> + ( {model | unsDomains = Dict.insert domainOwner domain model.unsDomains}, Cmd.none) + ---- VIEW ---- @@ -1235,7 +1257,7 @@ alertView ({ account, maybeGasPrice, network, userLanguage } as model) = NoAccount -> text "" - Acct (Customer address) maybeBalance -> + Acct (Customer address) maybeBalance _ -> let hasZeroEthBalance = case maybeBalance of @@ -1262,6 +1284,7 @@ alertView ({ account, maybeGasPrice, network, userLanguage } as model) = text "" + chooseWalletModal : Translations.Lang -> Model -> Html Msg chooseWalletModal userLanguage ({ connectedEthWalletModel } as model) = let @@ -1428,6 +1451,7 @@ subscriptions model = , Time.every (1000.0 * 1.0 * toFloat CompoundComponents.Utils.Time.seconds) Tick , Time.every (1000.0 * 4.0 * toFloat CompoundComponents.Utils.Time.hours) CheckVersion , onUrlChange (Url.fromString >> UrlChange) + , receiveUNSAddress ReceiveUNSDomain ] diff --git a/src/elm/Port.elm b/src/elm/Port.elm index b48376a..12da16c 100644 --- a/src/elm/Port.elm +++ b/src/elm/Port.elm @@ -12,6 +12,8 @@ port module Port exposing , imageError , setGasPrice , setTitle + , sendUNSAddress + , receiveUNSAddress ) import CompoundComponents.Eth.Decoders @@ -52,6 +54,11 @@ port askSetBlockNativeNetworkPort : { networkId : Int } -> Cmd msg port giveAccountBalancePort : (Value -> msg) -> Sub msg +-- UNS Address + +port sendUNSAddress : String -> Cmd msg +port receiveUNSAddress : ((String,String) -> msg) -> Sub msg + giveAccountBalance : (Result Json.Decode.Error Decimal -> msg) -> Sub msg giveAccountBalance wrapper = let diff --git a/src/js/ports.js b/src/js/ports.js index 4fa0f02..2623082 100644 --- a/src/js/ports.js +++ b/src/js/ports.js @@ -34,6 +34,7 @@ import { wrapCallErr, wrapSend, } from '../../node_modules/compound-components/src/js/sharedEth/eth'; +import Resolution from '@unstoppabledomains/resolution'; const PROVIDER_TYPE_NONE = 0; const PROVIDER_TYPE_LEDGER = 1; @@ -102,7 +103,7 @@ async function getBlockTimestamps(blockNumbers, network) { let blockNativeApiKey; let blockNativeNetwork = {}; let blockNative; - +const resolution = new Resolution(); function buildBlockNative(networkId) { if (blockNativeApiKey) { if (blockNativeNetwork[networkId]) { @@ -1632,6 +1633,22 @@ function subscribeToSetBlockNativeNetwork(app, eth) { buildBlockNative(networkId); }); } +function subscribeToGetUNSAddress(app, eth) { + + app.ports.sendUNSAddress.subscribe((address) => { + resolution + .reverse(address) + .then((domain) => { + if(domain != null){ + app.ports.receiveUNSAddress.send([address, domain]) + } + }) + // domain consists of the domain with reverse resolution to that address + // use this domain in your application + .catch(console.error); + }); +} + function subscribe( app, @@ -1662,6 +1679,7 @@ function subscribe( subscribeToAdminDashboard(app, eth); subscribeToGovernancePorts(app, eth); subscribeToFlywheelPorts(app, eth); + subscribeToGetUNSAddress(app, eth); // TODO: Do we want to reduce the globalness of these vars? blockNativeApiKey = blockNativeApiKeyInput; diff --git a/src/scss/header.scss b/src/scss/header.scss index b60d48f..9328cd2 100644 --- a/src/scss/header.scss +++ b/src/scss/header.scss @@ -116,7 +116,7 @@ header { border-radius: $border-radius; padding: ($column-gutter * 0.5); margin-left: $column-gutter; - + display: flex; &:hover { background: lighten($color_dark_2, 5%); } diff --git a/yarn.lock b/yarn.lock index abc9333..9246046 100644 --- a/yarn.lock +++ b/yarn.lock @@ -957,6 +957,21 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" +"@ethersproject/abi@^5.0.1": + version "5.6.4" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.6.4.tgz#f6e01b6ed391a505932698ecc0d9e7a99ee60362" + integrity sha512-TTeZUlCeIHG6527/2goZA6gW5F8Emoc7MrZDC7hhP84aRGvW3TEdTnZR08Ls88YXM1m2SuK42Osw/jSi3uO8gg== + dependencies: + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/hash" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/strings" "^5.6.1" + "@ethersproject/abstract-provider@5.4.1", "@ethersproject/abstract-provider@^5.4.0": version "5.4.1" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz#e404309a29f771bd4d28dbafadcaa184668c2a6e" @@ -970,6 +985,19 @@ "@ethersproject/transactions" "^5.4.0" "@ethersproject/web" "^5.4.0" +"@ethersproject/abstract-provider@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.6.1.tgz#02ddce150785caf0c77fe036a0ebfcee61878c59" + integrity sha512-BxlIgogYJtp1FS8Muvj8YfdClk3unZH0vRMVX791Z9INBNT/kuACZ9GzaY1Y4yFq+YSy6/w4gzj3HCRKrK9hsQ== + dependencies: + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/networks" "^5.6.3" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/transactions" "^5.6.2" + "@ethersproject/web" "^5.6.1" + "@ethersproject/abstract-signer@5.4.1", "@ethersproject/abstract-signer@^5.4.0": version "5.4.1" resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz#e4e9abcf4dd4f1ba0db7dff9746a5f78f355ea81" @@ -981,6 +1009,17 @@ "@ethersproject/logger" "^5.4.0" "@ethersproject/properties" "^5.4.0" +"@ethersproject/abstract-signer@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.6.2.tgz#491f07fc2cbd5da258f46ec539664713950b0b33" + integrity sha512-n1r6lttFBG0t2vNiI3HoWaS/KdOt8xyDjzlP2cuevlWLG6EX0OwcKLyG/Kp/cuwNxdy/ous+R/DEMdTUwWQIjQ== + dependencies: + "@ethersproject/abstract-provider" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/address@5.4.0", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3" @@ -992,6 +1031,17 @@ "@ethersproject/logger" "^5.4.0" "@ethersproject/rlp" "^5.4.0" +"@ethersproject/address@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.6.1.tgz#ab57818d9aefee919c5721d28cd31fd95eff413d" + integrity sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q== + dependencies: + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/rlp" "^5.6.1" + "@ethersproject/base64@5.4.0", "@ethersproject/base64@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.4.0.tgz#7252bf65295954c9048c7ca5f43e5c86441b2a9a" @@ -999,6 +1049,13 @@ dependencies: "@ethersproject/bytes" "^5.4.0" +"@ethersproject/base64@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.6.1.tgz#2c40d8a0310c9d1606c2c37ae3092634b41d87cb" + integrity sha512-qB76rjop6a0RIYYMiB4Eh/8n+Hxu2NIZm8S/Q7kNo5pmZfXhHGHmS4MinUainiBC54SCyRnwzL+KZjj8zbsSsw== + dependencies: + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/basex@5.4.0", "@ethersproject/basex@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.4.0.tgz#0a2da0f4e76c504a94f2b21d3161ed9438c7f8a6" @@ -1025,6 +1082,15 @@ "@ethersproject/logger" "^5.4.0" bn.js "^4.11.9" +"@ethersproject/bignumber@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.6.2.tgz#72a0717d6163fab44c47bcc82e0c550ac0315d66" + integrity sha512-v7+EEUbhGqT3XJ9LMPsKvXYHFc8eHxTowFCG/HgJErmq4XHJ2WR7aeyICg3uTOAQ7Icn0GFHAohXEhxQHq4Ubw== + dependencies: + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + bn.js "^5.2.1" + "@ethersproject/bytes@5.4.0", "@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.4.0.tgz#56fa32ce3bf67153756dbaefda921d1d4774404e" @@ -1032,6 +1098,13 @@ dependencies: "@ethersproject/logger" "^5.4.0" +"@ethersproject/bytes@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.6.1.tgz#24f916e411f82a8a60412344bf4a813b917eefe7" + integrity sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g== + dependencies: + "@ethersproject/logger" "^5.6.0" + "@ethersproject/constants@5.4.0", "@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.4.0.tgz#ee0bdcb30bf1b532d2353c977bf2ef1ee117958a" @@ -1039,6 +1112,13 @@ dependencies: "@ethersproject/bignumber" "^5.4.0" +"@ethersproject/constants@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.6.1.tgz#e2e974cac160dd101cf79fdf879d7d18e8cb1370" + integrity sha512-QSq9WVnZbxXYFftrjSjZDUshp6/eKp6qrtdBtUCm0QxCV5z1fG/w3kdlcsjMCQuQHUnAclKoK7XpXMezhRDOLg== + dependencies: + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/contracts@5.4.1": version "5.4.1" resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.1.tgz#3eb4f35b7fe60a962a75804ada2746494df3e470" @@ -1069,6 +1149,20 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" +"@ethersproject/hash@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.6.1.tgz#224572ea4de257f05b4abf8ae58b03a67e99b0f4" + integrity sha512-L1xAHurbaxG8VVul4ankNX5HgQ8PNCTrnVXEiFnE9xoRnaUcgfD12tZINtDinSllxPLCtGwguQxJ5E6keE84pA== + dependencies: + "@ethersproject/abstract-signer" "^5.6.2" + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/strings" "^5.6.1" + "@ethersproject/hdnode@5.4.0", "@ethersproject/hdnode@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.4.0.tgz#4bc9999b9a12eb5ce80c5faa83114a57e4107cac" @@ -1114,11 +1208,24 @@ "@ethersproject/bytes" "^5.4.0" js-sha3 "0.5.7" +"@ethersproject/keccak256@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.6.1.tgz#b867167c9b50ba1b1a92bccdd4f2d6bd168a91cc" + integrity sha512-bB7DQHCTRDooZZdL3lk9wpL0+XuG3XLGHLh3cePnybsO3V0rdCAOQGpn/0R3aODmnTOOkCATJiD2hnL+5bwthA== + dependencies: + "@ethersproject/bytes" "^5.6.1" + js-sha3 "0.8.0" + "@ethersproject/logger@5.4.1", "@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.4.0": version "5.4.1" resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.1.tgz#503bd33683538b923c578c07d1c2c0dd18672054" integrity sha512-DZ+bRinnYLPw1yAC64oRl0QyVZj43QeHIhVKfD/+YwSz4wsv1pfwb5SOFjz+r710YEWzU6LrhuSjpSO+6PeE4A== +"@ethersproject/logger@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.6.0.tgz#d7db1bfcc22fd2e4ab574cba0bb6ad779a9a3e7a" + integrity sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg== + "@ethersproject/networks@5.4.2", "@ethersproject/networks@^5.4.0": version "5.4.2" resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.2.tgz#2247d977626e97e2c3b8ee73cd2457babde0ce35" @@ -1126,6 +1233,13 @@ dependencies: "@ethersproject/logger" "^5.4.0" +"@ethersproject/networks@^5.6.3": + version "5.6.4" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.6.4.tgz#51296d8fec59e9627554f5a8a9c7791248c8dc07" + integrity sha512-KShHeHPahHI2UlWdtDMn2lJETcbtaJge4k7XSjDR9h79QTd6yQJmv6Cp2ZA4JdqWnhszAOLSuJEd9C0PRw7hSQ== + dependencies: + "@ethersproject/logger" "^5.6.0" + "@ethersproject/pbkdf2@5.4.0", "@ethersproject/pbkdf2@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.4.0.tgz#ed88782a67fda1594c22d60d0ca911a9d669641c" @@ -1141,6 +1255,13 @@ dependencies: "@ethersproject/logger" "^5.4.0" +"@ethersproject/properties@^5.6.0": + version "5.6.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.6.0.tgz#38904651713bc6bdd5bdd1b0a4287ecda920fa04" + integrity sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg== + dependencies: + "@ethersproject/logger" "^5.6.0" + "@ethersproject/providers@5.4.5": version "5.4.5" resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.4.5.tgz#eb2ea2a743a8115f79604a8157233a3a2c832928" @@ -1182,6 +1303,14 @@ "@ethersproject/bytes" "^5.4.0" "@ethersproject/logger" "^5.4.0" +"@ethersproject/rlp@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.6.1.tgz#df8311e6f9f24dcb03d59a2bac457a28a4fe2bd8" + integrity sha512-uYjmcZx+DKlFUk7a5/W9aQVaoEC7+1MOBgNtvNg13+RnuUwT4F0zTovC0tmay5SmRslb29V1B7Y5KCri46WhuQ== + dependencies: + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/sha2@5.4.0", "@ethersproject/sha2@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.4.0.tgz#c9a8db1037014cbc4e9482bd662f86c090440371" @@ -1203,6 +1332,18 @@ elliptic "6.5.4" hash.js "1.1.7" +"@ethersproject/signing-key@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.6.2.tgz#8a51b111e4d62e5a62aee1da1e088d12de0614a3" + integrity sha512-jVbu0RuP7EFpw82vHcL+GP35+KaNruVAZM90GxgQnGqB6crhBqW/ozBfFvdeImtmb4qPko0uxXjn8l9jpn0cwQ== + dependencies: + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + bn.js "^5.2.1" + elliptic "6.5.4" + hash.js "1.1.7" + "@ethersproject/solidity@5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.4.0.tgz#1305e058ea02dc4891df18b33232b11a14ece9ec" @@ -1223,6 +1364,15 @@ "@ethersproject/constants" "^5.4.0" "@ethersproject/logger" "^5.4.0" +"@ethersproject/strings@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.6.1.tgz#dbc1b7f901db822b5cafd4ebf01ca93c373f8952" + integrity sha512-2X1Lgk6Jyfg26MUnsHiT456U9ijxKUybz8IM1Vih+NJxYtXhmvKBcHOmvGqpFSVJ0nQ4ZCoIViR8XlRw1v/+Cw== + dependencies: + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/transactions@5.4.0", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.4.0.tgz#a159d035179334bd92f340ce0f77e83e9e1522e0" @@ -1238,6 +1388,21 @@ "@ethersproject/rlp" "^5.4.0" "@ethersproject/signing-key" "^5.4.0" +"@ethersproject/transactions@^5.6.2": + version "5.6.2" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.6.2.tgz#793a774c01ced9fe7073985bb95a4b4e57a6370b" + integrity sha512-BuV63IRPHmJvthNkkt9G70Ullx6AcM+SDc+a8Aw/8Yew6YwT51TcBKEp1P4oOQ/bP25I18JJr7rcFRgFtU9B2Q== + dependencies: + "@ethersproject/address" "^5.6.1" + "@ethersproject/bignumber" "^5.6.2" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/constants" "^5.6.1" + "@ethersproject/keccak256" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/rlp" "^5.6.1" + "@ethersproject/signing-key" "^5.6.2" + "@ethersproject/units@5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.4.0.tgz#d57477a4498b14b88b10396062c8cbbaf20c79fe" @@ -1279,6 +1444,17 @@ "@ethersproject/properties" "^5.4.0" "@ethersproject/strings" "^5.4.0" +"@ethersproject/web@^5.6.1": + version "5.6.1" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.6.1.tgz#6e2bd3ebadd033e6fe57d072db2b69ad2c9bdf5d" + integrity sha512-/vSyzaQlNXkO1WV+RneYKqCJwualcUdx/Z3gseVovZP0wIlOFcCE1hkRhKBH8ImKbGQbMl9EAAyJFrJu7V0aqA== + dependencies: + "@ethersproject/base64" "^5.6.1" + "@ethersproject/bytes" "^5.6.1" + "@ethersproject/logger" "^5.6.0" + "@ethersproject/properties" "^5.6.0" + "@ethersproject/strings" "^5.6.1" + "@ethersproject/wordlists@5.4.0", "@ethersproject/wordlists@^5.4.0": version "5.4.0" resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.4.0.tgz#f34205ec3bbc9e2c49cadaee774cf0b07e7573d7" @@ -1644,6 +1820,18 @@ dependencies: "@types/node" "*" +"@unstoppabledomains/resolution@^8.2.0": + version "8.2.0" + resolved "https://registry.yarnpkg.com/@unstoppabledomains/resolution/-/resolution-8.2.0.tgz#9abc76f83a83f60d551fc7c397182b9ae5e93511" + integrity sha512-qh/uGNVxKI73B+HrhZYAV+L3KY5k5HYTaUZvf3GpmhRicB3XO08gRjF+uhzrYaL9EW352S9l/PW2NV+ibVUf9g== + dependencies: + "@ethersproject/abi" "^5.0.1" + bn.js "^4.4.0" + cross-fetch "^3.1.4" + elliptic "^6.5.4" + js-sha256 "^0.9.0" + js-sha3 "^0.8.0" + "@walletconnect/browser-utils@^1.6.5": version "1.6.5" resolved "https://registry.yarnpkg.com/@walletconnect/browser-utils/-/browser-utils-1.6.5.tgz#01180682e90b95384e820191a1c6ad4a78729439" @@ -2575,7 +2763,7 @@ bn.js@4.11.8: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9: +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.4.0: version "4.12.0" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== @@ -2585,6 +2773,11 @@ bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== +bn.js@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" + integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== + bnc-sdk@^2.1.5: version "2.1.5" resolved "https://registry.yarnpkg.com/bnc-sdk/-/bnc-sdk-2.1.5.tgz#7f40bcf98eb0238882f5436c0e860e60be2867c0" @@ -3615,6 +3808,13 @@ cross-fetch@^2.1.0: node-fetch "2.6.1" whatwg-fetch "2.0.4" +cross-fetch@^3.1.4: + version "3.1.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + dependencies: + node-fetch "2.6.7" + cross-spawn@6.0.5, cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -4147,7 +4347,7 @@ electron-to-chromium@^1.3.378, electron-to-chromium@^1.3.830: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.838.tgz#d178b34a268c750c0444ba69e4c94d4c4fb3aa0d" integrity sha512-65O6UJiyohFAdX/nc6KJ0xG/4zOn7XCO03kQNNbCeMRGxlWTLzc6Uyi0tFNQuuGWqySZJi8CD2KXPXySVYmzMA== -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -6825,7 +7025,7 @@ it-to-stream@^1.0.0: p-fifo "^1.0.0" readable-stream "^3.6.0" -js-sha256@0.9.0: +js-sha256@0.9.0, js-sha256@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/js-sha256/-/js-sha256-0.9.0.tgz#0b89ac166583e91ef9123644bd3c5334ce9d0966" integrity sha512-sga3MHh9sgQN2+pJ9VYZ+1LPwXOxuBJBA5nrR5/ofPfuiJBE2hnjsaN8se8JznOmGLN2p49Pe5U/ttafcs/apA== @@ -7849,15 +8049,15 @@ node-fetch@2.6.1: resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== +node-fetch@2.6.7, "node-fetch@https://registry.npmjs.org/@achingbrain/node-fetch/-/node-fetch-2.6.7.tgz": + version "2.6.7" + resolved "https://registry.npmjs.org/@achingbrain/node-fetch/-/node-fetch-2.6.7.tgz#1b5d62978f2ed07b99444f64f0df39f960a6d34d" + node-fetch@^2.6.0, node-fetch@^2.6.1: version "2.6.2" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.2.tgz#986996818b73785e47b1965cc34eb093a1d464d0" integrity sha512-aLoxToI6RfZ+0NOjmWAgn9+LEd30YCkJKFSyWacNZdEKTit/ZMcKjGkTRo8uWEsnIb/hfKecNPEbln02PdWbcA== -"node-fetch@https://registry.npmjs.org/@achingbrain/node-fetch/-/node-fetch-2.6.7.tgz": - version "2.6.7" - resolved "https://registry.npmjs.org/@achingbrain/node-fetch/-/node-fetch-2.6.7.tgz#1b5d62978f2ed07b99444f64f0df39f960a6d34d" - node-fetch@~1.7.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"