Fix jsonrpc method rename on block txs
This commit is contained in:
parent
35374f0e92
commit
ea21605f84
@ -5,7 +5,11 @@ import queryString from "query-string";
|
|||||||
import StandardFrame from "./StandardFrame";
|
import StandardFrame from "./StandardFrame";
|
||||||
import BlockTransactionHeader from "./BlockTransactionHeader";
|
import BlockTransactionHeader from "./BlockTransactionHeader";
|
||||||
import BlockTransactionResults from "./BlockTransactionResults";
|
import BlockTransactionResults from "./BlockTransactionResults";
|
||||||
import { ProcessedTransaction } from "./types";
|
import {
|
||||||
|
InternalOperation,
|
||||||
|
OperationType,
|
||||||
|
ProcessedTransaction,
|
||||||
|
} from "./types";
|
||||||
import { PAGE_SIZE } from "./params";
|
import { PAGE_SIZE } from "./params";
|
||||||
import { RuntimeContext } from "./useRuntime";
|
import { RuntimeContext } from "./useRuntime";
|
||||||
|
|
||||||
@ -72,14 +76,18 @@ const BlockTransactions: React.FC = () => {
|
|||||||
|
|
||||||
const internalChecks = await Promise.all(
|
const internalChecks = await Promise.all(
|
||||||
responses.map(async (res) => {
|
responses.map(async (res) => {
|
||||||
const r = await provider.send("ots_getTransactionTransfers", [
|
const r: InternalOperation[] = await provider.send(
|
||||||
res.hash,
|
"ots_getInternalOperations",
|
||||||
]);
|
[res.hash]
|
||||||
for (const t of r) {
|
);
|
||||||
|
for (const op of r) {
|
||||||
|
if (op.type !== OperationType.TRANSFER) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
res.miner &&
|
res.miner &&
|
||||||
(res.miner === ethers.utils.getAddress(t.from) ||
|
(res.miner === ethers.utils.getAddress(op.from) ||
|
||||||
res.miner === ethers.utils.getAddress(t.to))
|
res.miner === ethers.utils.getAddress(op.to))
|
||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user