Skip to content

Commit

Permalink
Update App.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Sep 7, 2023
1 parent f308f04 commit 1fa6394
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,30 @@ const App = () => {
<View style={styles.container}>
<View style={styles.section}>
<Text>Put & Get</Text>

<Button
title={inprogress ? 'Putting & Getting...' : 'newclient'}
onPress={async () => {
try {
await fula.shutdown();
let clientinit = await fula.newClient(
privateKey.toString()
, ''
, bloxAddr
, bloxAddr? '' : 'noop'
, true
,true
, true
);
if (clientinit) {
console.log('newClient complete');
console.log(clientinit);
} else {
console.log('wait for newClient to complete');
}
} catch (e) {}
}}
color={inprogress ? 'green' : 'blue'}
/>
<Button
title={inprogress ? 'Putting & Getting...' : 'Init'}
onPress={async () => {
Expand Down

0 comments on commit 1fa6394

Please sign in to comment.