Send an Address Filecoin View Source



Here is an example of an experience for sending a filecoin address filecoin using Textile's Powergate


From
To
Amount (Filecoin)



Code



0
import * as React from "react";
1
import { SendAddressFilecoin } from "slate-react-system";
2
import { createPow } from "@textile/powergate-client";
3
4
const PowerGate = createPow({ host: "https://grpcweb.slate.textile.io" });
5
6
class Example extends React.Component {
7
  componentDidMount = async () => {
8
    const FFS = await PowerGate.ffs.create();
9
    const token = FFS.token ? FFS.token : null;
10
    PowerGate.setToken(token);
11
    this.setState({ token });
12
  };
13
14
  _handleSend = async ({ source, target, amount }) => {
15
    const response = await PowerGate.ffs.sendFil(source, target, amount);
16
  };
17
18
  render() {
19
    return <SendAddressFilecoin onSubmit={this._handleSend} />;
20
  }
21
}
22
ExperiencesCreateFilecoinAddressCreateFilecoinStorageDealCreateTokenFilecoinBalancesListFilecoinDealsListFilecoinSettingsFriendsListPeersListSendAddressFilecoin

Components
Avatar GroupButtonsCard TabsCarouselCheckboxesColorsDatepickerDropdownsGlobeHover TileIconsInputsLine ChartList EditorLoadersModalsNotificationsRadiosSlidersStatsTablesTabsTogglesTooltipsTypography
View source