mirror of
https://github.com/aljazceru/react-native-pubky.git
synced 2025-12-18 23:24:22 +01:00
fix: fix name conflict
Resolves name conflicts with other native modules. Bump version to 0.1.1.
This commit is contained in:
@@ -1,14 +1,41 @@
|
||||
import { StyleSheet, View, Button } from 'react-native';
|
||||
import { auth } from 'react-native-pubky';
|
||||
import { auth } from '@synonymdev/react-native-pubky';
|
||||
import { getAddress } from 'react-native-address-generator';
|
||||
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<Button
|
||||
title={'getAddress'}
|
||||
onPress={async (): Promise<void> => {
|
||||
const mnemonic =
|
||||
'lazy rally chat way pet outside flame cup oval absurd innocent balcony';
|
||||
const passphrase = 'passphrase';
|
||||
const path = "m/84'/1'/0'/0/0";
|
||||
const network = 'testnet';
|
||||
|
||||
const getAddressRes = await getAddress({
|
||||
mnemonic,
|
||||
path,
|
||||
network,
|
||||
passphrase,
|
||||
});
|
||||
if (getAddressRes.isErr()) {
|
||||
console.log(getAddressRes.error.message);
|
||||
return;
|
||||
}
|
||||
console.log(getAddressRes.value);
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
title={'auth'}
|
||||
onPress={async (): Promise<void> => {
|
||||
try {
|
||||
const res = await auth('pubkyAuthUrl', 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855');
|
||||
const res = await auth(
|
||||
'pubkyAuthUrl',
|
||||
'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
|
||||
);
|
||||
if (res.isErr()) {
|
||||
console.log(res.error.message);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user