Skip to content

Commit

Permalink
Update mock data to match new table data
Browse files Browse the repository at this point in the history
  • Loading branch information
DemogorGod committed Jul 19, 2023
1 parent 5e7882b commit 5ec6b4a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 7 deletions.
9 changes: 5 additions & 4 deletions apps/web/src/mockData/mock_transaction_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,17 @@ export default function useTxData () {
const transaction = {
walletAddress: walletAddresses[i % walletAddresses.length],
walletBalance: String(generateRandomBalance()),
txDirection: 'incoming',
txDirection: Math.random() < 0.5? 'incoming': 'outgoing',
txId: '0xf46d39ca96e489fb0eb2097f073bfde2dc7960bf8358e0692fa79cc8597d283e',
receivedAt: generateRandomDate(),
amount: (Math.random() * 20.00).toFixed(2),
price: '0.0',
gasFee: '195178697897910',
price: (Math.random() * 2000.00).toFixed(2),
gasFee: (Math.random() * 10.00).toFixed(2),
stakeFee: (Math.random() * 10.00).toFixed(2),
rewards:(Math.random() * 10.00).toFixed(2),
apy: (Math.random() * 10.00).toFixed(2) + '%',
status: Math.random() > 0.5? 'Pending' : 'Active',
opperators: [ 'red', 'green', 'blue', 'orange', 'yellow'] //This is random until I get more info on how it will look like from backend
type: Math.random() > 0.5? null : Math.random() > 0.5? 'Stake SSV' : 'Withdraw',
}

data.push(transaction)
Expand Down
37 changes: 34 additions & 3 deletions apps/web/src/pages/overview/components/BreakdownTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,14 @@ const tableHeaderOptions = ref(
{
title: 'Stake Balance',
value: 'stk_amt'
},
}, // Need to fetch based on wallet (FE SIDE)
{
title: 'Stake Rewards (All-Time)',
value: 'stk_rwd'
}
}, // Need to fetch based on wallet (FE SIDE)
]
},
Transactions: {
// Date | Account | Type | Amount | Status | Hash
headers: [
{
title: 'Date',
Expand All @@ -67,6 +66,38 @@ const tableHeaderOptions = ref(
}
]
},
Staking: {
headers: [
{
title: 'Date',
value: 'date'
},
{
title: 'Account',
value: 'account'
},
{
title: 'Type',
value: 'type'
},
{
title: 'Amount',
value: 'amount'
},
{
title: 'Staking Fees',
value: 'staking_fees'
},
{
title: 'Status',
value: 'status'
},
{
title: 'Hash',
value: 'tx_hash'
},
]
},
}
)
Expand Down

0 comments on commit 5ec6b4a

Please sign in to comment.