Skip to content

Commit

Permalink
remove unnecessary awaits
Browse files Browse the repository at this point in the history
  • Loading branch information
diivi committed Dec 8, 2021
1 parent 8054ab3 commit 9a2d571
Show file tree
Hide file tree
Showing 2 changed files with 653 additions and 15 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const secretKey = newPair._keypair.secretKey;
const getWalletBalance = async () => {
try {
const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
const myWallet = await Keypair.fromSecretKey(secretKey);
const myWallet = Keypair.fromSecretKey(secretKey);
const walletBalance = await connection.getBalance(
new PublicKey(myWallet.publicKey)
);
Expand All @@ -35,7 +35,7 @@ const getWalletBalance = async () => {
const airDropSol = async () => {
try {
const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
const walletKeyPair = await Keypair.fromSecretKey(secretKey);
const walletKeyPair = Keypair.fromSecretKey(secretKey);
console.log(`-- Airdropping 5 SOL --`)
const fromAirDropSignature = await connection.requestAirdrop(
new PublicKey(walletKeyPair.publicKey),
Expand Down
Loading

0 comments on commit 9a2d571

Please sign in to comment.