Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Latest commit

 

History

History

transfer-widget

Sygma UI widget example

This package provides a minimal implementation of the Sygma UI transfer form

How to use

Sygma UI with integrated connection logic

widget with integrated onboardjs

import Widget from "sygma-ui-transfer-widget-unstable";
const App: React.FC<{}> = () => {

  // Your SygmaUI config
  const runtimeConfig = {...}

  return (
    <Widget config={runtimeConfig} />
  );
};

SygmaUI with standard web3 provider

Widget with standard web3 provider passing as an argument. Could be useful if you have your own web3 connection logic in your application

import React, { useEffect, useState } from "react";
import Widget from "sygma-ui-transfer-widget-unstable";

const App: React.FC<{}> = () => {
  const [provider, setProvider] = useState()

  // Your SygmaUI config
  const runtimeConfig = {...}

  //init the provider
  useEffect(() => {
    setProvider(window.ethereum)
  }, [])

  return (
    <Widget config={runtimeConfig} externalProviderSource={provider} useExternalProvider={true} />
  );
};