fix: fetch block data for sortKey on viewState evaluation - remove BlockData type

This commit is contained in:
Asia
2024-03-04 15:40:55 +01:00
parent a192e1042b
commit 482bc15724

View File

@@ -45,7 +45,6 @@ import { ContractInteractionState } from './states/ContractInteractionState';
import { Buffer, Crypto } from 'warp-isomorphic'; import { Buffer, Crypto } from 'warp-isomorphic';
import { VrfPluginFunctions } from '../core/WarpPlugin'; import { VrfPluginFunctions } from '../core/WarpPlugin';
import { createData, DataItem, Signer, tagsExceedLimit } from 'warp-arbundles'; import { createData, DataItem, Signer, tagsExceedLimit } from 'warp-arbundles';
import { BlockData } from 'arweave/node/blocks';
interface InteractionManifestData { interface InteractionManifestData {
[path: string]: string; [path: string]: string;
@@ -852,7 +851,7 @@ export class HandlerBasedContract<State> implements Contract<State> {
const blockHeight = sortKey ? await this._sorter.extractBlockHeight(sortKey) : undefined; const blockHeight = sortKey ? await this._sorter.extractBlockHeight(sortKey) : undefined;
let currentBlockData: BlockData; let currentBlockData;
if (this.warp.environment == 'mainnet' && !(this.warp.interactionsLoader.type() === 'arweave')) { if (this.warp.environment == 'mainnet' && !(this.warp.interactionsLoader.type() === 'arweave')) {
currentBlockData = await this._arweaveWrapper.warpGwBlock(); currentBlockData = await this._arweaveWrapper.warpGwBlock();
} else { } else {