Swing Points Program is Live 🚀 Learn More →

Changelog

Stay up to date with the latest changes to @swing.xyz/sdk.


v0.43.1

November 9th, 2023

  • Prevent emitting TRANSFER event after transfer has been completed

v0.43.0

November 9th, 2023

  • Add support for canceling a transfer
swingSDK.on('TRANSFER', async (transferStep, transferResults) => {
  // Unique ID for the transfer in progress
  const transferId = transferResults.transferId;
 
  switch (transferStep.status) {
    case 'WALLET_CONNECTION_REQUIRED':
      try {
        await connectWallet(transferStep.chain);
      } catch (error) {
        // Cancel transfer if user rejects wallet connection
        swingSDK.cancelTransfer(transferId);
      }
      break;
 
    case 'CHAIN_SWITCH_REQUIRED':
      try {
        await switchNetwork(transferStep.chain.chainId);
      } catch (error) {
        // Cancel transfer if user rejects network switch
        swingSDK.cancelTransfer(transferId);
      }
      break;
  }
});
 
await swingSDK.transfer(transferRoute, transferParams);

v0.42.0

November 6th, 2023

  • Add support for claiming a transaction
const transactions = await swingSDK.getTransactions();
 
const transaction = transactions.find(
  (transaction) => transaction.status === 'Claim Required',
);
 
if (transaction) {
  await swingSDK.claim(transaction);
}

v0.41.0

November 6th, 2023

  • Chains list will now only include chains enabled by your project configuration.
await swingSDK.init();
 
const chains = swingSDK.chains;

v0.40.0

October 30th, 2023

  • Staking quotes will now include both native routes and secondary (DEX) routes.

v0.26.6

June 15th, 2023

  • Correctly display popup windows on Firefox browsers

v0.26.0

June 8th, 2023

  • Phantom wallet is now supported

v0.25.0

June 7th, 2023

  • Automatically sync chain between user's wallet and the widget

v0.22.0

May 31st, 2023

  • Supports multi-step approval process for certain ERC20 tokens

v0.21.0

May 17th, 2023

  • Improves CSS scoping to prevent collisions with consumer applications

v0.19.0

May 5th, 2023

  • Staking (beta)

v0.17.0

April 5th, 2023

  • Fees are available in their USD equivalent

v0.16.12

March 31th, 2023

  • Transaction status will take precedence over transfer status
  • Bridge fees are displayed in the correct source or destination tokens
  • Token balances are displayed as soon as they are available

v0.16.0

March 10th, 2023

  • MultiversX chain is now available

v0.14.1

March 1st, 2023

  • Bridge steps are included in quote repsonse
  • Configure project identifer (projectId) with Swing Platform
  • Configure project identifer (projectId) with Swing Platform
  • Reduced bundle size by ~400kb

v0.12.0

Feb 24th, 2023

  • Add WalletConnect to IBC wallets
  • Display bridge & gas fee in native token
  • Use correct RPC URL for Cosmos chains
  • Wait for transaction to be confirmed before continuing transfer process

v0.10.26

Feb 19th, 2023

  • Add “style” to package.json for post-css support
  • Reduce overall bundle size by ~20%

v0.10.25

Feb 16th, 2023

  • In progress transfers are now updated automatically in the history dialog.
  • Prevents the transfer UI from getting suck at the "Chain switch required" step.
  • Prevents the resetting UI state while the transfer is in progress.
  • Formats all token amounts to 5 decimal places.
  • Reduces the overall bundle size by ~30%.
  • Updates config with the latest chain and token lists.

v0.10.18

Feb 2nd, 2023

  • The support dialog is hidden until a valid support ID is received.
  • Chain and token logos have a white background.
  • Notify API with valid transaction hashes.

v0.10.15

Jan 24th, 2023

  • Chain-specific RPC URLs are used to look up token balances.
  • Route select items are not squished.

v0.10.13

Jan 17th, 2023

  • added a new refund endpoint
  • a support ID is displayed in the transfer progress and transaction history dialogs
  • Native tokens display the correct token symbol.
  • Token balances refresh on an interval.
  • Scrolling stops at the last token in the token list.
  • In progress transactions are included in the history dialog.
  • Searching by chain name and slug is not case sensitive.
  • Removes loading state from input for send amount.
  • Updates config with the latest chain and token lists.