Skip to content

Commit

Permalink
feat: updaing desc and naming to Send tez from Ghostnet to Etherlink
Browse files Browse the repository at this point in the history
  • Loading branch information
hui-an-yang committed Apr 30, 2024
1 parent 323cc92 commit e88ff58
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 27 deletions.
12 changes: 6 additions & 6 deletions apps/taquito-test-dapp/src/lib/TestContainer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
test.id === "sign-payload-and-send" ||
test.id === "sign-failingNoop" ||
test.id === "verify-signature" ||
test.id === "transfer-to-etherlink" ||
test.id === "send-tez-to-etherlink" ||
test.id === "set-transaction-limits"
) {
result = await test.run(input);
Expand Down Expand Up @@ -303,17 +303,17 @@
bind:value={input.text}
/>
</div>
{:else if test.inputRequired && test.inputType === "transfer-to-etherlink"}
<div class="test-input test-transfer-etherlink">
<label for="transfer-address">
{:else if test.inputRequired && test.inputType === "etherlink"}
<div class="test-input test-send-tez-to-etherlink">
<label for="etherlink-address">
<span>Etherlink address</span>
<input type="string" id="etherlink-address" bind:value={input.address} />
</label>
<br />
<br />
<label for="transfer-amount">
<label for="send-amount">
<span>amount</span>
<input type="number" id="transfer-amount" bind:value={input.amount} />
<input type="number" id="send-amount" bind:value={input.amount} />
</label>
</div>
{:else if test.inputRequired && test.inputType === "set-limits"}
Expand Down
39 changes: 19 additions & 20 deletions apps/taquito-test-dapp/src/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const preparePayloadToSign = (
};
};

const transferToEtherlink = async (
const sendTezToEtherlink = async (
amount: number,
address: string,
tezos: TezosToolkit,
Expand Down Expand Up @@ -566,8 +566,8 @@ const saplingShielded = async (
};

export const list = [
"Transfer tez from ghostnet to Etherlink",
"Send tez",
"Send tez from Ghostnet to Etherlink",
"Contract call with int",
"Contract call with (pair nat string)",
"Contract call that fails",
Expand All @@ -591,34 +591,33 @@ export const init = (
contract: ContractAbstraction<Wallet> | ContractAbstraction<ContractProvider>,
wallet: BeaconWallet | undefined
): TestSettings[] => [

{
id: "transfer-to-etherlink",
name: "Transfer tez from ghostnet to Etherlink",
id: "send-tez",
name: "Send tez",
description: "This test sends 0.1 tez to Alice's address",
documentation: 'https://taquito.io/docs/wallet_API#making-transfers',
keyword: 'transfer',
run: () => sendTez(Tezos),
showExecutionTime: false,
inputRequired: false,
lastResult: { option: "none", val: false }
},
{
id: "send-tez-to-etherlink",
name: "Send tez from Ghostnet to Etherlink",
description:
"This test allows you transfer your tez from ghostnet to etherlink",
"This test allows you send your ghostnet tez to etherlink address",
documentation: '',
keyword: 'transfer to etherlink',
keyword: 'etherlink',
run: input =>
transferToEtherlink(
sendTezToEtherlink(
input.amount,
input.address,
Tezos
),
showExecutionTime: false,
inputRequired: true,
inputType: "transfer-to-etherlink",
lastResult: { option: "none", val: false }
},
{
id: "send-tez",
name: "Send tez",
description: "This test sends 0.1 tez to Alice's address",
documentation: 'https://taquito.io/docs/wallet_API#making-transfers',
keyword: 'transfer',
run: () => sendTez(Tezos),
showExecutionTime: false,
inputRequired: false,
inputType: "etherlink",
lastResult: { option: "none", val: false }
},
{
Expand Down
2 changes: 1 addition & 1 deletion apps/taquito-test-dapp/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface TestSettings {
run: (input?: any) => Promise<TestResult>;
showExecutionTime: boolean;
inputRequired: boolean;
inputType?: "string" | "set-limits" | "sapling" | "transfer-to-etherlink";
inputType?: "string" | "set-limits" | "sapling" | "etherlink";
lastResult: { option: "none" | "some"; val: boolean };
}

Expand Down

0 comments on commit e88ff58

Please sign in to comment.