mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-23 14:07:20 +03:00
design system: adds set token documentation
This commit is contained in:
parent
0b580421e4
commit
c23a4182cf
@ -11,8 +11,11 @@ import { createPow } from "@textile/powergate-client";
|
||||
const PowerGate = createPow({ host: 'http://0.0.0.0:6002' });
|
||||
const FFS = await PowerGate.ffs.create();
|
||||
const token = FFS.token ? FFS.token : null;
|
||||
PowerGate.setToken(token)
|
||||
|
||||
class Example extends React.Component {
|
||||
// NOTE(jim):
|
||||
// Requires token and authentication.
|
||||
_handleCreateAddress = async ({ name, type, makeDefault }) => {
|
||||
const response = await PowerGate.ffs.newAddr(
|
||||
name,
|
||||
|
@ -20,7 +20,8 @@ class Example extends React.Component {
|
||||
// Requires PowerGate to be running locally.
|
||||
const PowerGate = createPow({ host: 'http://0.0.0.0:6002' });
|
||||
const FFS = await PowerGate.ffs.create();
|
||||
return FFS.token ? FFS.token : null;
|
||||
const token = FFS.token ? FFS.token : null;
|
||||
PowerGate.setToken(token);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -11,6 +11,7 @@ import { createPow } from "@textile/powergate-client";
|
||||
const PowerGate = createPow({ host: 'http://0.0.0.0:6002' });
|
||||
const FFS = await PowerGate.ffs.create();
|
||||
const token = FFS.token ? FFS.token : null;
|
||||
PowerGate.setToken(token)
|
||||
|
||||
class Example extends React.Component {
|
||||
_handleSend = async ({ source, target, amount }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user