Skip to content

Commit

Permalink
added replication test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Nov 21, 2023
1 parent 4c8c833 commit b275de2
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,32 @@ const App = () => {
}}
color={inprogress ? 'green' : 'blue'}
/>


<Button
title={inprogress ? 'Putting & Getting...' : 'Test Replicate'}
onPress={async () => {
try {
chainApi.init().then((api: any) => {
console.log('api created');
if (api && initComplete) {
console.log('replicate');
fula
.replicateRecentCids(api, seed, 3)
.then((res: any) => {
console.log('res received');
console.log(res);
})
.catch((e: any) => {
console.log('res failed');
console.log(e);
});
}
});
} catch (e) {}
}}
color={inprogress ? 'green' : 'blue'}
/>
</View>
</View>
);
Expand Down

0 comments on commit b275de2

Please sign in to comment.