Merge pull request #62 from cosmos/run-lint-in-ci

Create lint and build job using GH Actions
This commit is contained in:
Simon Warta
2022-06-09 08:35:42 +02:00
committed by GitHub
4 changed files with 38 additions and 8 deletions
+29
View File
@@ -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
+1 -1
View File
@@ -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();
+7 -6
View File
@@ -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);
+1 -1
View File
@@ -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("");