Skip to content

Commit 61fe4f0

Browse files
committed
Formatting
1 parent e92006f commit 61fe4f0

File tree

2 files changed

+12
-23
lines changed

2 files changed

+12
-23
lines changed

tokens/transfer-tokens/poseidon/tests/transfer_sol.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import * as anchor from "@coral-xyz/anchor";
2-
import { Program } from "@coral-xyz/anchor";
3-
import { BN } from "bn.js";
4-
import { TransferSol } from "../target/types/transfer_sol";
1+
import * as anchor from '@coral-xyz/anchor';
2+
import { Program } from '@coral-xyz/anchor';
3+
import { BN } from 'bn.js';
4+
import { TransferSol } from '../target/types/transfer_sol';
55

6-
describe("transfer_sol", () => {
6+
describe('transfer_sol', () => {
77
//UTILS
88
const confirm = async (signature: string): Promise<string> => {
99
const block = await provider.connection.getLatestBlockhash();
@@ -28,14 +28,12 @@ describe("transfer_sol", () => {
2828
const airdropAmount = 2.5 * anchor.web3.LAMPORTS_PER_SOL;
2929
const transferAmount = 1 * anchor.web3.LAMPORTS_PER_SOL;
3030

31-
it("Airdrop", async () => {
32-
const airdropMaker = await provider.connection
33-
.requestAirdrop(maker.publicKey, airdropAmount)
34-
.then(confirm);
35-
console.log("\nAirdropped 5 SOL to maker", airdropMaker);
31+
it('Airdrop', async () => {
32+
const airdropMaker = await provider.connection.requestAirdrop(maker.publicKey, airdropAmount).then(confirm);
33+
console.log('\nAirdropped 5 SOL to maker', airdropMaker);
3634
});
3735

38-
it("Transfer token", async () => {
36+
it('Transfer token', async () => {
3937
// Add your test here.
4038
const tx = await program.methods
4139
.transferWithProgram(new BN(transferAmount))
@@ -45,6 +43,6 @@ describe("transfer_sol", () => {
4543
})
4644
.signers([maker])
4745
.rpc();
48-
console.log("Your transaction signature", tx);
46+
console.log('Your transaction signature', tx);
4947
});
5048
});

tokens/transfer-tokens/poseidon/ts-programs/src/transferSol.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
1-
import {
2-
Pubkey,
3-
Result,
4-
Signer,
5-
SystemAccount,
6-
SystemProgram,
7-
u64,
8-
} from "@solanaturbine/poseidon";
1+
import { Pubkey, Result, Signer, SystemAccount, SystemProgram, u64 } from '@solanaturbine/poseidon';
92

103
export default class TransferSol {
11-
static PROGRAM_ID = new Pubkey(
12-
"HU7QEokj5qUUV5ryZYL7EhsqiAkxJyMVXc3DesKyCqtF"
13-
);
4+
static PROGRAM_ID = new Pubkey('HU7QEokj5qUUV5ryZYL7EhsqiAkxJyMVXc3DesKyCqtF');
145

156
transferWithProgram(from: Signer, to: SystemAccount, amount: u64): Result {
167
SystemProgram.transfer(from, to, amount);

0 commit comments

Comments
 (0)