From 61fe4f03471e0c0c3ff77e5fa3b26e0dd791202b Mon Sep 17 00:00:00 2001 From: Dogukan Ali Gundogan <59707019+DogukanGun@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:31:58 +0100 Subject: [PATCH] Formatting --- .../poseidon/tests/transfer_sol.ts | 22 +++++++++---------- .../poseidon/ts-programs/src/transferSol.ts | 13 ++--------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/tokens/transfer-tokens/poseidon/tests/transfer_sol.ts b/tokens/transfer-tokens/poseidon/tests/transfer_sol.ts index b5b82690f..1a7d7a92f 100644 --- a/tokens/transfer-tokens/poseidon/tests/transfer_sol.ts +++ b/tokens/transfer-tokens/poseidon/tests/transfer_sol.ts @@ -1,9 +1,9 @@ -import * as anchor from "@coral-xyz/anchor"; -import { Program } from "@coral-xyz/anchor"; -import { BN } from "bn.js"; -import { TransferSol } from "../target/types/transfer_sol"; +import * as anchor from '@coral-xyz/anchor'; +import { Program } from '@coral-xyz/anchor'; +import { BN } from 'bn.js'; +import { TransferSol } from '../target/types/transfer_sol'; -describe("transfer_sol", () => { +describe('transfer_sol', () => { //UTILS const confirm = async (signature: string): Promise => { const block = await provider.connection.getLatestBlockhash(); @@ -28,14 +28,12 @@ describe("transfer_sol", () => { const airdropAmount = 2.5 * anchor.web3.LAMPORTS_PER_SOL; const transferAmount = 1 * anchor.web3.LAMPORTS_PER_SOL; - it("Airdrop", async () => { - const airdropMaker = await provider.connection - .requestAirdrop(maker.publicKey, airdropAmount) - .then(confirm); - console.log("\nAirdropped 5 SOL to maker", airdropMaker); + it('Airdrop', async () => { + const airdropMaker = await provider.connection.requestAirdrop(maker.publicKey, airdropAmount).then(confirm); + console.log('\nAirdropped 5 SOL to maker', airdropMaker); }); - it("Transfer token", async () => { + it('Transfer token', async () => { // Add your test here. const tx = await program.methods .transferWithProgram(new BN(transferAmount)) @@ -45,6 +43,6 @@ describe("transfer_sol", () => { }) .signers([maker]) .rpc(); - console.log("Your transaction signature", tx); + console.log('Your transaction signature', tx); }); }); diff --git a/tokens/transfer-tokens/poseidon/ts-programs/src/transferSol.ts b/tokens/transfer-tokens/poseidon/ts-programs/src/transferSol.ts index 8009190ba..de0d28c18 100644 --- a/tokens/transfer-tokens/poseidon/ts-programs/src/transferSol.ts +++ b/tokens/transfer-tokens/poseidon/ts-programs/src/transferSol.ts @@ -1,16 +1,7 @@ -import { - Pubkey, - Result, - Signer, - SystemAccount, - SystemProgram, - u64, -} from "@solanaturbine/poseidon"; +import { Pubkey, Result, Signer, SystemAccount, SystemProgram, u64 } from '@solanaturbine/poseidon'; export default class TransferSol { - static PROGRAM_ID = new Pubkey( - "HU7QEokj5qUUV5ryZYL7EhsqiAkxJyMVXc3DesKyCqtF" - ); + static PROGRAM_ID = new Pubkey('HU7QEokj5qUUV5ryZYL7EhsqiAkxJyMVXc3DesKyCqtF'); transferWithProgram(from: Signer, to: SystemAccount, amount: u64): Result { SystemProgram.transfer(from, to, amount);