diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..99606a4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +on: + # Push to long living branches or PRs + push: + branches: + - main + pull_request: + +jobs: + lint: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '16' + - run: npm install + - run: npm run lint + # Fix and re-activate after https://github.com/cosmos/cosmos-multisig-ui/pull/61 + # build: + # runs-on: ubuntu-20.04 + # steps: + # - uses: actions/checkout@v2 + # - name: Setup Node.js + # uses: actions/setup-node@v2 + # with: + # node-version: '16' + # - run: npm install + # - run: npm run build diff --git a/components/chainSelect/ChainSelect.js b/components/chainSelect/ChainSelect.js index 372dbf7..01c1440 100644 --- a/components/chainSelect/ChainSelect.js +++ b/components/chainSelect/ChainSelect.js @@ -33,7 +33,7 @@ const ChainSelect = () => { const [tempRegistryName, setRegistryName] = useState(state.chain.registryName); const [tempExplorerLink, setExplorerLink] = useState(state.chain.explorerLink); - let url = "https://api.github.com/repos/cosmos/chain-registry/contents"; + const url = "https://api.github.com/repos/cosmos/chain-registry/contents"; useEffect(() => { getGhJson(); diff --git a/components/forms/TransactionSigning.js b/components/forms/TransactionSigning.js index 0dba118..1327fa4 100644 --- a/components/forms/TransactionSigning.js +++ b/components/forms/TransactionSigning.js @@ -1,7 +1,7 @@ import React, { useState } from "react"; import axios from "axios"; import { toBase64 } from "@cosmjs/encoding"; -import { assertIsDeliverTxFailure, SigningStargateClient } from "@cosmjs/stargate"; +import { SigningStargateClient } from "@cosmjs/stargate"; import { assert } from "@cosmjs/utils"; import { useAppContext } from "../../context/AppContext"; @@ -38,7 +38,7 @@ const TransactionSigning = (props) => { const connectLedger = async () => { // Prepare ledger - const ledgerTransport = await TransportWebUSB.create(120_000, 120_000); + const ledgerTransport = await TransportWebUSB.create(120000, 120000); // Setup signer const offlineSigner = new LedgerSigner(ledgerTransport, { @@ -61,10 +61,11 @@ const TransactionSigning = (props) => { const signTransaction = async () => { const offlineSigner = walletType === "keplr" ? window.getOfflineSignerOnlyAmino(state.chain.chainId) : ledgerSigner; - - const signerAddress = walletType === "keplr" - ? walletAccount.bech32Address - : (await ledgerSigner.getAccounts())[0]?.address; + + const signerAddress = + walletType === "keplr" + ? walletAccount.bech32Address + : (await ledgerSigner.getAccounts())[0]?.address; assert(signerAddress, "Missing signer address"); const signingClient = await SigningStargateClient.offline(offlineSigner); diff --git a/pages/multi/[address]/index.js b/pages/multi/[address]/index.js index e6333f4..39ae39b 100644 --- a/pages/multi/[address]/index.js +++ b/pages/multi/[address]/index.js @@ -23,7 +23,7 @@ function participantAddressesFromMultisig(multisigPubkey, addressPrefix) { ); } -const multipage = (props) => { +const multipage = (_props) => { const { state } = useAppContext(); const [showTxForm, setShowTxForm] = useState(false); const [holdings, setHoldings] = useState("");