transaction load test
This commit is contained in:
parent
554fd0c228
commit
3f33a7dd41
1 changed files with 5 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { Box } from "@mui/material";
|
||||
import { Bin } from "models";
|
||||
import { pond } from "protobuf-ts/pond";
|
||||
import { useTransactionAPI } from "providers";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
interface Props {
|
||||
|
|
@ -10,10 +11,13 @@ interface Props {
|
|||
export default function BinTransactions(props: Props){
|
||||
const { bin } = props
|
||||
const [state, setState] = useState<pond.TransactionState>(pond.TransactionState.TRANSACTION_STATE_PENDING)
|
||||
const transactionAPI = useTransactionAPI()
|
||||
|
||||
useEffect(()=>{
|
||||
// load transactions for bin with matching state (pending is default)
|
||||
|
||||
transactionAPI.listTransactionsFor(10, 0, "asc", bin.key()).then(resp => {
|
||||
console.log(resp)
|
||||
})
|
||||
},[state, bin])
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue