mirror of
https://github.com/Qortal/names.git
synced 2025-06-14 18:21:21 +00:00
fix fetch primary name
This commit is contained in:
parent
01bc736d6b
commit
147d3dad75
@ -11,14 +11,11 @@ export const FetchNamesProvider = ({ children }: { children: ReactNode }) => {
|
|||||||
if (!address) return;
|
if (!address) return;
|
||||||
try {
|
try {
|
||||||
const res = await qortalRequest({
|
const res = await qortalRequest({
|
||||||
action: 'GET_ACCOUNT_NAMES',
|
action: 'GET_PRIMARY_NAME',
|
||||||
address,
|
address,
|
||||||
limit: 0,
|
|
||||||
offset: 0,
|
|
||||||
reverse: false,
|
|
||||||
});
|
});
|
||||||
if (res?.length > 0) {
|
if (res) {
|
||||||
setPrimaryName(res[0]?.name);
|
setPrimaryName(res);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user