⚛️
Leap Cosmos
  • Introduction
  • for dapps: Connect to Leap
    • Introduction
    • Optimizing Wallet Connectivity for Cosmos Dapps
    • Add Leap to existing Keplr integration
    • Add Leap to a new dapp
    • Suggest chain : Add Leap to a non-native chain
    • Add Leap to a Secret dapp
    • Wallet Connect
    • Wallet Adapters
      • Cosmos Kit
      • Shuttle
    • API Reference
  • for chains: integrate into Leap
    • Introduction
  • for SEI dapps: Connect to Compass
    • Connect to Compass
  • FOR SEI EVM DAPPS: CONNECT TO COMPASS
    • Connect to Compass
    • Supported RPC methods
  • Leap Metamask Snap
    • Introduction
    • Integrating Snaps
      • Metamask Cosmos Snap
      • Cosmos Snap Provider
      • Cosmos Kit
  • Embedded Wallet SDK
    • Embedded Wallet SDK React
    • Embedded Wallet Provider
    • Migration
    • Usage without UI
  • Elements
    • Introduction
    • Get Started
    • Integrate via CDN / Script Tag
    • Integrate as an Embed
    • Components
      • Aggregated Swaps
      • IBC Only Swaps
      • Fiat On-ramp
      • IBC Transfer
      • Multi View
    • Theming
      • Using CSS Variables
      • Advanced Customisations
    • Use Elements Without the UI
    • Tab Config
    • Using Skip API Key
  • Cosmos Nodes
    • Fallback Falooda : Node Fallback System
    • (Coming Soon) Blockchain Node Setup Guide
    • (Coming Soon) Monitoring Blockchain Node Performance
  • RESOURCES
    • Leap Assets
Powered by GitBook
On this page
  • Common customisations via props
  • Props
  1. Elements
  2. Components

Fiat On-ramp

Understand how to use the FiatOnRamp component

PreviousIBC Only SwapsNextIBC Transfer

Last updated 8 months ago

Common customisations via props

Props

className (optional)

Add classes to customise the styling

title (optional)

Use to set the title of tab.

Default Value - "Buy"

sourceHeader(optional)

Use to set custom text for source section header

Default Value - "You pay"

destinationHeader(optional)

Use to set custom text for destination section header

Default Value - "You get"

showPoweredByBanner (optional)

This is a boolean which toggles the visibility for the powered by text for the tab - Powered by Leap and Kado

Default Value - false

defaultValues (optional)

This is an object that contains the default values for the tab

  • sourceAmount: input amount

  • currency: currency using which you want buy tokens

  • destinationChainId: chainId of the destination chain

  • destinationAsset: denom of destination asset

allowedCurrencies (optional)

Pass in an array of string where each string is a code representing the currency e.g USD, EUR INR

const allowedCurrencies = ['USD', 'EUR', 'INR']

allowedDestinationChains (optional)

Pass in an array of objects with a chainId property set to the chains you want to display on the source side. You can also restrict the denominations for each chain.

const allowedDestinationChains = [
    {
        chainId: 'cosmoshub-4',  // cosmos hub mainnet
        assetDenoms: [           // optional
            'uatom',
            'ibc/9A234CF0...',
            // and so on...
        ]
    },
]

onTxnComplete (optional)

This a callback which is fired when transaction completes

onTxnInProgress (optional)

This a callback which is fired when transaction is initiated

onFiatAmountChange (optional)

This a callback which is fired when input amount is changed

onFiatCurrencyChange (optional)

This a callback which is fired when currency is changed

onDestinationChainChange (optional)

This a callback which is fired when destination chain is changed

onCryptoCurrencyChange (optional)

This a callback which is fired when destination asset is changed

Restrict allowed source currencies
Restrict destination chains and destination assets
Set a default input amount, source currency destination chain or asset
Get notified when input amount or any chain or assets is chosen change
Get notified when an on-ramp transaction is completed