Skip to content

Commit

Permalink
Merge pull request #487 from Cryptonomic/as-names
Browse files Browse the repository at this point in the history
Metadata update
  • Loading branch information
anonymoussprocket authored May 11, 2021
2 parents 2dfbe52 + 14c8b02 commit 8ec731c
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 44 deletions.
89 changes: 80 additions & 9 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,14 @@
"baker_registry": "TCF Baker Registry",
"bakers_history": "Baker History",
"transactions": "Transactions",
"contracts": "Accounts",
"contracts": "Contracts",
"logs": "Logs",
"receipts": "Receipts"
"receipts": "Receipts",
"tokens": "Tokens",
"tokens_history": "Token History",
"token_transfers": "Token Transfers",
"outputs": "Outputs",
"inputs": "Inputs"
}
},
"attributes": {
Expand All @@ -148,6 +153,17 @@
"block_level": "Block Level",
"is_baker": "Baker",
"is_activated": "Activated",
"address": "Address",
"block_hash": "Block Hash",
"block_number": "Block Number",
"bytecode": "Bytecode",
"bytecode_hash": "Bytecode Hash",
"decimals": "Decimals",
"name": "Name",
"symbol": "Symbol",
"timestamp": "Timestamp",
"token_standard": "Token Standard",
"total_supply": "Total Supply",
"token_balances": "Token Balances"
},
"accounts_history": {
Expand All @@ -162,7 +178,10 @@
"cycle": "Cycle",
"is_baker": "Registered Baker",
"is_active_baker": "Active Baker",
"is_activated": "Activated Account"
"is_activated": "Activated Account",
"address": "Address",
"block_hash": "Block Hash",
"block_number": "Block Number"
},
"balance_updates": {
"account_id": "Address",
Expand Down Expand Up @@ -233,7 +252,19 @@
"state_root": "State Root",
"total_difficulty": "Total Difficulty",
"transactions_root": "Transactions Root",
"uncles": "Uncles"
"uncles": "Uncles",
"bits": "Bits",
"chain_work": "Chain Work",
"height": "Level",
"median_time": "Median Time",
"merkle_root": "Merkle Root",
"next_block_hash": "Next Block Hash",
"previous_block_hash": "Previous Block Hash",
"stripped_size": "Stripped Size",
"time": "Timestamp",
"version": "Version",
"version_hex": "Version Hex",
"weight": "Weight"
},
"bakers": {
"pkh": "Address",
Expand Down Expand Up @@ -436,8 +467,9 @@
"block_hash": "Block Hash",
"block_number": "Block Level",
"bytecode": "Bytecode",
"is_erc20": "ERC20",
"is_erc721": "ERC721"
"bytecode_hash": "Code Hash",
"timestamp": "Timestamp",
"token_standard": "Token Standard"
},
"transactions": {
"block_hash": "Block Hash",
Expand All @@ -453,7 +485,8 @@
"nonce": "Nonce",
"destination": "Destination",
"transaction_index": "Index",
"amount": "Amount"
"amount": "Amount",
"timestamp": "Timestamp"
},
"logs": {
"address": "Address",
Expand All @@ -464,7 +497,8 @@
"removed": "Removed",
"topics": "Topics",
"transaction_hash": "Transaction Hash",
"transaction_index": "Transaction Index"
"transaction_index": "Transaction Index",
"timestamp": "Timestamp"
},
"receipts": {
"block_hash": "Block Hash",
Expand All @@ -476,7 +510,44 @@
"root": "Root",
"status": "Status",
"transaction_hash": "Transaction Hash",
"transaction_index": "Transaction Index"
"transaction_index": "Transaction Index",
"timestamp": "Timestamp"
},
"token_transfers": {
"block_hash": "Block Hash",
"block_number": "Block Level",
"from_address": "Source",
"log_index": "Log Index",
"timestamp": "Timestamp",
"to_address": "Destination",
"token_address": "Token Address",
"transaction_hash": "Transaction Hash",
"value": "Amount"
},
"tokens_history": {
"account_address": "Address",
"asof": "As of Date",
"block_hash": "Block Hash",
"block_number": "Block Level",
"token_address": "Token Address",
"transaction_hash": "Transaction Hash",
"value": "Amount"
},
"tokens": {
"address": "Address",
"block_hash": "Block Hash",
"block_number": "Block Level",
"decimals": "Decimals",
"name": "Name",
"symbol": "Symbol",
"timestamp": "Timestamp",
"total_supply": "Total Supply"
},
"outputs": {

},
"inputs": {

}
},
"operators": {
Expand Down
13 changes: 12 additions & 1 deletion src/containers/Modal/parts/TokensTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const useStyles = makeStyles({

export default function TokensTable({ items }: { items: Record<string, string>[] }) {
const classes = useStyles();
const coinTotal = items.reduce((a, c) => { return Number(a) + (Number(c.coinBalance) || 0) }, 0);

return (
<TableContainer component={Paper}>
Expand All @@ -24,7 +25,8 @@ export default function TokensTable({ items }: { items: Record<string, string>[]
<TableRow>
<TableCell>Token</TableCell>
<TableCell align="right">Location</TableCell>
<TableCell align="right">Balance</TableCell>
<TableCell align="right">Tokens</TableCell>
<TableCell align="right">XTZ</TableCell>
</TableRow>
</TableHead>
<TableBody>
Expand All @@ -33,8 +35,17 @@ export default function TokensTable({ items }: { items: Record<string, string>[]
<TableCell component="th" scope="row">{row.token}</TableCell>
<TableCell align="right">{row.location}</TableCell>
<TableCell align="right">{row.balance}</TableCell>
<TableCell align="right">{row.coinBalance}</TableCell>
</TableRow>
))}
{coinTotal && (
<TableRow key="xtzTotal">
<TableCell component="th" scope="row">Total</TableCell>
<TableCell align="right"></TableCell>
<TableCell align="right"></TableCell>
<TableCell align="right">{coinTotal}</TableCell>
</TableRow>
)}
</TableBody>
</Table>
</TableContainer>
Expand Down
3 changes: 3 additions & 0 deletions src/reducers/app/thunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ export const initLoad = (props: InitLoad) => async (dispatch: any, state: any) =
} catch (e) {
if (e.message) {
await dispatch(createMessageAction(e.message, true));
} else {
console.log(e);
console.log(e.stack)
}
}
};
Expand Down
Loading

0 comments on commit 8ec731c

Please sign in to comment.