Transaction History

Swing SDK exposes a helper method to easily get a list of transactions made by this wallet.

const transactions = await swingSDK.wallet.getTransactions();

Unclaimed tokens

The above transactions can be used to check for pending, completed and unclaimed transactions.

for (const tx of transactions) {
  if (tx.status === 'Claim Required') {
    // This is only required if the user closes the browser
    // before claiming their tokens during the transfer process
    await swingSDK.claim(tx);
  }
}

Transaction URL

Get the transaction URL for a given transaction hash.

const txUrl = swingSDK.getTransactionUrl(chainSlug, txHash);
 
// Example: https://etherscan.io/tx/{txhash}