Skip to content

Commit

Permalink
fix: date formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Jan 13, 2021
1 parent 1978629 commit 0452589
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion app/components/home/balance-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export const BalanceCard: FC<BalanceCardProps> = props => {
<Text>{toHumanReadableStx(available)} available</Text>
</Flex>
)}

<Box mt="loose">
<Button size="md" onClick={onSelectSend} isDisabled={balance === '0' || balance === null}>
<ArrowIcon direction="up" mr="base-tight" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const TransactionListItemMempool: FC<TransactionListItemMempoolProps> = p
)
return null;

const txDate = new Date(tx.receipt_time);
const txDate = new Date(tx.receipt_time_iso);
const txDateShort = txDate.toLocaleString();

return (
Expand Down
2 changes: 1 addition & 1 deletion app/pages/home/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const Home: FC = () => {
const balanceCard = (
<BalanceCard
address={address}
lockedStx={stackerInfo?.details.amount_microstx}
lockedStx={balance?.locked}
balance={balance?.balance || null}
onSelectSend={() => dispatch(homeActions.openTxModal())}
onSelectReceive={() => dispatch(homeActions.openReceiveModal())}
Expand Down
4 changes: 0 additions & 4 deletions app/store/address/address.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ export function getAddressDetails(address: string) {
return async (dispatch: Dispatch, getState: GetState) => {
dispatch(fetchAddress());
const activeNode = selectActiveNodeApi(getState());
// const [, xxx] = await safeAwait(
// new Api(activeNode.url).accountsApi.getAccountStxBalance({ principal: address })
// );
// console.log(xxx);
const [error, response] = await safeAwait(
new Api(activeNode.url).accountsApi.getAccountStxBalance({ principal: address })
);
Expand Down

0 comments on commit 0452589

Please sign in to comment.