Skip to content

Commit

Permalink
nft
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Apr 5, 2024
1 parent f7b5f98 commit ef39ee5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,10 @@ jobs:
run: |
cca --example provide-liquidity --name provide-liquidity
cd provide-liquidity
yarn build
- name: nft
run: |
cca --example nft --name nft
cd nft
yarn build
2 changes: 1 addition & 1 deletion examples/nft/hooks/useTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function useTx() {
if (!client) return new TxResult({ error: new TxError('Invalid SigningCosmWasm client') });
if (!signed) return new TxResult({ error: new TxError('Invalid transaction') });

const response = await client.broadcastTx(Uint8Array.from(txRaw.encode(signed).finish()));
const response: any = await client.broadcastTx(Uint8Array.from(txRaw.encode(signed).finish()));
return isDeliverTxSuccess(response)
? new TxResult({ response })
: new TxResult({ response, error: new TxError(response.rawLog) });
Expand Down
5 changes: 4 additions & 1 deletion examples/nft/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { getSigningCosmosClientOptions } from 'stargaze-query';
import { GasPrice } from '@cosmjs/stargate';

import { Box, ThemeProvider, Toaster, useTheme, useColorModeValue } from '@interchain-ui/react';
import { Chain } from '@chain-registry/types';

const queryClient = new QueryClient({
defaultOptions: {
Expand All @@ -30,7 +31,8 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
signingStargate: () => {
return getSigningCosmosClientOptions();
},
signingCosmwasm: (chain) => {
// @ts-ignore
signingCosmwasm: (chain: Chain) => {
switch (chain.chain_name) {
case 'stargaze':
return {
Expand Down Expand Up @@ -63,6 +65,7 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
>
<QueryClientProvider client={queryClient}>
<Box className={themeClass} minHeight="100dvh" backgroundColor={useColorModeValue('$white', '$background')}>
{/* @ts-ignore */}
<Component {...pageProps} />
</Box>
</QueryClientProvider>
Expand Down

0 comments on commit ef39ee5

Please sign in to comment.