Skip to content

Commit

Permalink
- set input to current adventurer name by default
Browse files Browse the repository at this point in the history
- don't get balances on katana
  • Loading branch information
starknetdev committed Oct 7, 2024
1 parent 985607e commit 8018d11
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion ui/src/app/components/start/AdventurerListCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ export const AdventurerListCard = ({
>(null);

const [isEditOpen, setIsEditOpen] = useState(false);
const [adventurerName, setAdventurerName] = useState("");
const [adventurerName, setAdventurerName] = useState(adventurer?.name || "");

useEffect(() => {
setAdventurerName(adventurer?.name!);
}, [adventurer]);

const [isMaxLength, setIsMaxLength] = useState(false);

const setAdventurer = useAdventurerStore((state) => state.setAdventurer);
Expand Down
6 changes: 3 additions & 3 deletions ui/src/app/lib/utils/syscalls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,7 @@ export function createSyscalls({
}

setIsMintingLords(false);
getBalances();
!onKatana && getBalances();
} catch (e) {
setIsMintingLords(false);
console.log(e);
Expand Down Expand Up @@ -1611,7 +1611,7 @@ export function createSyscalls({
adventurers: [adventurer],
});

getBalances();
!onKatana && getBalances();
stopLoading("Transferred Adventurer", false, "Transfer");
} catch (error) {
console.error(error);
Expand Down Expand Up @@ -1681,7 +1681,7 @@ export function createSyscalls({
],
});

getBalances();
!onKatana && getBalances();
stopLoading("Changed Adventurer Name", false, "Change Name");
}
} catch (error) {
Expand Down

0 comments on commit 8018d11

Please sign in to comment.