Skip to content

Commit b275de2

Browse files
committed
added replication test case
1 parent 4c8c833 commit b275de2

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

example/src/App.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,32 @@ const App = () => {
644644
}}
645645
color={inprogress ? 'green' : 'blue'}
646646
/>
647+
648+
649+
<Button
650+
title={inprogress ? 'Putting & Getting...' : 'Test Replicate'}
651+
onPress={async () => {
652+
try {
653+
chainApi.init().then((api: any) => {
654+
console.log('api created');
655+
if (api && initComplete) {
656+
console.log('replicate');
657+
fula
658+
.replicateRecentCids(api, seed, 3)
659+
.then((res: any) => {
660+
console.log('res received');
661+
console.log(res);
662+
})
663+
.catch((e: any) => {
664+
console.log('res failed');
665+
console.log(e);
666+
});
667+
}
668+
});
669+
} catch (e) {}
670+
}}
671+
color={inprogress ? 'green' : 'blue'}
672+
/>
647673
</View>
648674
</View>
649675
);

0 commit comments

Comments
 (0)