We will be sunsetting Advisor during Jan, 2026 and will instead be providing information in Snyk Security DB.

You can begin to take advantage of Snyk Security DB today for a unified, package-centric experience.

How to use @ramp-network/ramp-instant-sdk - 2 common examples

To help you get started, we’ve selected a few @ramp-network/ramp-instant-sdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bugduino / idle / client / src / utilities / components / BuyModal.js View on Github external
widget.on("error", function (e) {
            console.log("Wyre error", e);
        });

        widget.on("complete", function (e) {
            console.log("Wyre complete", e );
        });

        widget.on('ready', function(e) {
            console.log("Wyre ready", e );
        });

        widget.open();
      break;
      case 'ramp':
        new RampInstantSDK(initParams)
          .on('*', async (event) => {
            let tokenDecimals = null;
            let tokenAmount = null;

            switch (event.type){
              case 'PURCHASE_SUCCESSFUL':
                // Update balance
                this.props.getAccountBalance();

                tokenDecimals = await this.props.getTokenDecimals();

                tokenAmount = event.payload.purchase.tokenAmount;
                tokenAmount = BNify(tokenAmount.toString()).div(BNify(Math.pow(10,parseInt(tokenDecimals)).toString())).toString();

                // Toast message
                window.toastProvider.addMessage(`Payment completed`, {
github AdExNetwork / adex-platform / src / components / dashboard / account / AccountInfo.js View on Github external
const displayRampWidget = () => {
		const widget = new RampInstantSDK({
			hostAppName: 'AdExNetwork',
			hostLogoUrl: 'https://www.adex.network/img/Adex-logo@2x.png',
			variant: 'auto',
			swapAsset: 'DAI',
			userAddress: account.identity.address,
		})
		widget.domNodes.overlay.style.zIndex = 1000
		widget.show()
	}

@ramp-network/ramp-instant-sdk

SDK for Ramp Instant

MIT
Latest version published 2 months ago

Package Health Score

76 / 100
Full package analysis

Popular @ramp-network/ramp-instant-sdk functions

Similar packages