diff --git a/apps/wallet-dashboard/app/(protected)/assets/page.tsx b/apps/wallet-dashboard/app/(protected)/assets/page.tsx index ed96fe0a519..7007cc86c5c 100644 --- a/apps/wallet-dashboard/app/(protected)/assets/page.tsx +++ b/apps/wallet-dashboard/app/(protected)/assets/page.tsx @@ -29,7 +29,7 @@ export default function AssetsDashboardPage(): React.JSX.Element { const [selectedAsset, setSelectedAsset] = useState(null); const [selectedCategory, setSelectedCategory] = useState(AssetCategory.Visual); const account = useCurrentAccount(); - const { data, isFetching, fetchNextPage, hasNextPage } = useGetOwnedObjects( + const { data, isFetching, fetchNextPage, hasNextPage, refetch } = useGetOwnedObjects( account?.address, undefined, OBJECTS_PER_REQ, @@ -79,7 +79,11 @@ export default function AssetsDashboardPage(): React.JSX.Element { fetchNextPage={fetchNextPage} /> {selectedAsset && ( - setSelectedAsset(null)} asset={selectedAsset} /> + setSelectedAsset(null)} + asset={selectedAsset} + refetchAssets={refetch} + /> )} diff --git a/apps/wallet-dashboard/components/Dialogs/Assets/AssetDialog.tsx b/apps/wallet-dashboard/components/Dialogs/Assets/AssetDialog.tsx index f2c23e0af39..2d8b08302d5 100644 --- a/apps/wallet-dashboard/components/Dialogs/Assets/AssetDialog.tsx +++ b/apps/wallet-dashboard/components/Dialogs/Assets/AssetDialog.tsx @@ -17,6 +17,7 @@ import { DialogLayout } from '../layout'; interface AssetsDialogProps { onClose: () => void; asset: IotaObjectData; + refetchAssets: () => void; } interface FormValues { @@ -27,7 +28,7 @@ const INITIAL_VALUES: FormValues = { to: '', }; -export function AssetDialog({ onClose, asset }: AssetsDialogProps): JSX.Element { +export function AssetDialog({ onClose, asset, refetchAssets }: AssetsDialogProps): JSX.Element { const [view, setView] = useState(AssetsDialogView.Details); const account = useCurrentAccount(); const [digest, setDigest] = useState(''); @@ -55,6 +56,7 @@ export function AssetDialog({ onClose, asset }: AssetsDialogProps): JSX.Element }); setDigest(tx.digest); + refetchAssets(); addNotification('Transfer transaction successful', NotificationType.Success); setView(AssetsDialogView.TransactionDetails); } catch {