Skip to content

Commit

Permalink
stake-tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Apr 5, 2024
1 parent 0df9bf7 commit 805ea68
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,14 @@ jobs:
- name: Install Dependencies
run: npm install -g create-cosmos-app

- name: check install
- name: vote-proposal
run: |
cca --example vote-proposal --name vote-proposal
cd vote-proposal
yarn build
- name: send-tokens
run: |
cca --example send-tokens --name send-tokens
cd send-tokens
yarn build
2 changes: 2 additions & 0 deletions examples/stake-tokens/components/wallet/WalletConnect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export const ConnectWalletButton = ({
gap="$4"
as="span"
borderRadius="8px"
// TODO fix type error
// @ts-ignore
style={{
zIndex: '1',
}}
Expand Down
2 changes: 2 additions & 0 deletions examples/stake-tokens/components/wallet/WarnBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export const WarnBlock = ({
justifyContent="center"
width="$full"
overflowY="scroll"
// TODO fix type error
// @ts-ignore
style={{
// For Firefox
scrollbarWidth: 'auto',
Expand Down
2 changes: 1 addition & 1 deletion examples/stake-tokens/hooks/useTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const useTx = (chainName: string) => {
if (client && signed) {
await client
.broadcastTx(Uint8Array.from(txRaw.encode(signed).finish()))
.then((res) => {
.then((res: any) => {
if (isDeliverTxSuccess(res)) {
if (options.onSuccess) options.onSuccess();

Expand Down
5 changes: 5 additions & 0 deletions examples/stake-tokens/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
const { themeClass } = useTheme();

const signerOptions: SignerOptions = {
// TODO fix type error
// @ts-ignore
signingStargate: (chain) => {
let gasPrice;
try {
// TODO fix type error
// @ts-ignore
const feeToken = chain.fees?.fee_tokens[0];
const fee = `${feeToken?.average_gas_price || 0.025}${feeToken?.denom}`;
gasPrice = GasPrice.fromString(fee);
Expand Down Expand Up @@ -70,6 +74,7 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
minHeight="100dvh"
backgroundColor={useColorModeValue('$white', '$background')}
>
{/* @ts-ignore */}
<Component {...pageProps} />
<Toaster position="top-right" closeButton={true} />
</Box>
Expand Down

0 comments on commit 805ea68

Please sign in to comment.