This package provides a minimal implementation of the Sygma UI transfer form
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} />
);
};
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} />
);
};