Skip to content

Commit

Permalink
fix(transfer): linting & ts-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
jessevanmuijden committed Jul 24, 2023
1 parent a7979ce commit e7c9ac2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ChainwebChainId } from '@kadena/chainweb-node-client';
import { StringContractDefinition } from '@kadena/pactjs-generator';

import { kadenaConstants, Network } from '@/constants/kadena';
import { convertIntToChainId } from '@/services/utils/utils';
import dynamic from 'next/dynamic';
Expand All @@ -20,8 +21,12 @@ const ModulePage: FC = () => {
Debug('kadena-transfer:pages:transfer:module-explorer:module');
const { t } = useTranslation('common');
const [pactCode, setPactCode] = useState('');
const [functions, setFunctions] = useState<Record<string, { method: string }> | undefined>({});
const [capabilities, setCapabilities] = useState<Record<string, { defcap: string }> | undefined>({});
const [functions, setFunctions] = useState<
Record<string, { method: string }> | undefined
>({});
const [capabilities, setCapabilities] = useState<
Record<string, { defcap: string }> | undefined
>({});
const [interfaces, setInterfaces] = useState<string[]>([]);
const router = useRouter();
const { network, chain, module } = router.query;
Expand Down Expand Up @@ -53,12 +58,12 @@ const ModulePage: FC = () => {
throw new Error(JSON.stringify(result.error));
}

const resultSuccess = (result as unknown) as {
const resultSuccess = result as unknown as {
data: {
code: string;
interfaces: string[];
}
}
};
};

const pactCode = resultSuccess.data.code || '';
setPactCode(pactCode);
Expand Down
2 changes: 2 additions & 0 deletions packages/apps/transfer/src/services/faucet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ export const fundExistingAccount = async (
new PactNumber(amount).toPactDecimal(),
),
)
//@ts-ignore
.addSigner(FAUCET_PUBLIC_KEY, (withCap) => [withCap('coin.GAS')])
.addSigner(keyPair.publicKey, (withCap) => [
//@ts-ignore
withCap(
'coin.TRANSFER',
SENDER_ACCOUNT,
Expand Down

0 comments on commit e7c9ac2

Please sign in to comment.