diff --git a/.changeset/rich-cheetahs-occur.md b/.changeset/rich-cheetahs-occur.md new file mode 100644 index 000000000..17ec2af9a --- /dev/null +++ b/.changeset/rich-cheetahs-occur.md @@ -0,0 +1,8 @@ +--- +"@onflow/fcl": patch +"@onflow/sdk": patch +"@onflow/transport-grpc": patch +"@onflow/transport-http": patch +--- + +**BREAKING** Remove deprecated block builders, interaction types and send methods. diff --git a/packages/fcl/src/fcl.js b/packages/fcl/src/fcl.js index f2d7b35fe..a66c0f1db 100644 --- a/packages/fcl/src/fcl.js +++ b/packages/fcl/src/fcl.js @@ -39,7 +39,6 @@ export {send} from "@onflow/sdk" export {decode} from "@onflow/sdk" export {account} from "@onflow/sdk" export {block} from "@onflow/sdk" -export {latestBlock} from "@onflow/sdk" export {isOk, isBad, why, pipe, build} from "@onflow/sdk" export {withPrefix, sansPrefix, display} from "@onflow/util-address" export {template as cadence} from "@onflow/util-template" @@ -58,11 +57,8 @@ export {getAccount} from "@onflow/sdk" export {getEvents} from "@onflow/sdk" export {getEventsAtBlockHeightRange} from "@onflow/sdk" export {getEventsAtBlockIds} from "@onflow/sdk" -export {getLatestBlock} from "@onflow/sdk" export {getBlock} from "@onflow/sdk" export {getBlockHeader} from "@onflow/sdk" -export {getBlockById} from "@onflow/sdk" -export {getBlockByHeight} from "@onflow/sdk" export {getCollection} from "@onflow/sdk" export {getTransactionStatus} from "@onflow/sdk" export {getTransaction} from "@onflow/sdk" diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.md index a089c3d79..4fc730b8b 100644 --- a/packages/sdk/CHANGELOG.md +++ b/packages/sdk/CHANGELOG.md @@ -1,5 +1,3 @@ -## Unreleased - ## 1.0.0-alpha.0 ### Major Changes diff --git a/packages/sdk/src/build/build-get-block-by-height.js b/packages/sdk/src/build/build-get-block-by-height.js deleted file mode 100644 index 2789981fd..000000000 --- a/packages/sdk/src/build/build-get-block-by-height.js +++ /dev/null @@ -1,25 +0,0 @@ -import {pipe, Ok, makeGetBlockByHeight} from "../interaction/interaction.js" - -export function getBlockByHeight(height) { - - console.warn( - ` - %cFCL/SDK Deprecation Notice - ============================ - - The getBlockByHeight builder has been deprecated and will be removed in future versions of the Flow JS-SDK/FCL. - You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0003-deprecate-get-block-by-height-builder - - ============================ - `, - "font-weight:bold;font-family:monospace;" - ) - - return pipe([ - makeGetBlockByHeight, - ix => { - ix.block.height = height - return Ok(ix) - } - ]) -} diff --git a/packages/sdk/src/build/build-get-block-by-height.test.js b/packages/sdk/src/build/build-get-block-by-height.test.js deleted file mode 100644 index 6aba23242..000000000 --- a/packages/sdk/src/build/build-get-block-by-height.test.js +++ /dev/null @@ -1,4 +0,0 @@ -test("placeholder", () => { - expect(0).toBe(0) -}) - \ No newline at end of file diff --git a/packages/sdk/src/build/build-get-block-by-id.js b/packages/sdk/src/build/build-get-block-by-id.js deleted file mode 100644 index 136702949..000000000 --- a/packages/sdk/src/build/build-get-block-by-id.js +++ /dev/null @@ -1,25 +0,0 @@ -import {pipe, Ok, makeGetBlockById} from "../interaction/interaction.js" - -export function getBlockById(id) { - - console.warn( - ` - %cFCL/SDK Deprecation Notice - ============================ - - The getBlockById builder has been deprecated and will be removed in future versions of the Flow JS-SDK/FCL. - You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0004-deprecate-get-block-by-id-builder - - ============================ - `, - "font-weight:bold;font-family:monospace;" - ) - - return pipe([ - makeGetBlockById, - ix => { - ix.block.ids = [id] - return Ok(ix) - } - ]) -} diff --git a/packages/sdk/src/build/build-get-block-by-id.test.js b/packages/sdk/src/build/build-get-block-by-id.test.js deleted file mode 100644 index 6aba23242..000000000 --- a/packages/sdk/src/build/build-get-block-by-id.test.js +++ /dev/null @@ -1,4 +0,0 @@ -test("placeholder", () => { - expect(0).toBe(0) -}) - \ No newline at end of file diff --git a/packages/sdk/src/contract.test.js b/packages/sdk/src/contract.test.js index 8bdc0be94..6881d0ba5 100644 --- a/packages/sdk/src/contract.test.js +++ b/packages/sdk/src/contract.test.js @@ -19,7 +19,7 @@ interfaceContract("export", root)` build resolve send decode isOk isBad why pipe - getAccount getEvents getLatestBlock getTransactionStatus + getAccount getEvents getTransactionStatus authorizations authorization params param proposer payer @@ -44,7 +44,7 @@ describe("consume", () => { interaction pipe Ok isOk isBad why put get update - makeGetAccount makeGetEvents makeGetLatestBlock + makeGetAccount makeGetEvents makeGetTransactionStatus makePing makeScript makeTransaction isTransaction isScript diff --git a/packages/sdk/src/interaction/interaction.js b/packages/sdk/src/interaction/interaction.js index 88554e2c7..b23620645 100644 --- a/packages/sdk/src/interaction/interaction.js +++ b/packages/sdk/src/interaction/interaction.js @@ -7,11 +7,8 @@ export const TRANSACTION /* */ = "TRANSACTION" export const GET_TRANSACTION_STATUS /* */ = "GET_TRANSACTION_STATUS" export const GET_ACCOUNT /* */ = "GET_ACCOUNT" export const GET_EVENTS /* */ = "GET_EVENTS" -export const GET_LATEST_BLOCK /* */ = "GET_LATEST_BLOCK" export const PING /* */ = "PING" export const GET_TRANSACTION /* */ = "GET_TRANSACTION" -export const GET_BLOCK_BY_ID /* */ = "GET_BLOCK_BY_ID" -export const GET_BLOCK_BY_HEIGHT /* */ = "GET_BLOCK_BY_HEIGHT" export const GET_BLOCK /* */ = "GET_BLOCK" export const GET_BLOCK_HEADER /* */ = "GET_BLOCK_HEADER" export const GET_COLLECTION /* */ = "GET_COLLECTION" @@ -217,9 +214,6 @@ export const makeGetTransactionStatus /* */ = makeIx(GET_TRANSACTION_STATUS) export const makeGetTransaction /* */ = makeIx(GET_TRANSACTION) export const makeGetAccount /* */ = makeIx(GET_ACCOUNT) export const makeGetEvents /* */ = makeIx(GET_EVENTS) -export const makeGetLatestBlock /* */ = makeIx(GET_LATEST_BLOCK) -export const makeGetBlockById /* */ = makeIx(GET_BLOCK_BY_ID) -export const makeGetBlockByHeight /* */ = makeIx(GET_BLOCK_BY_HEIGHT) export const makePing /* */ = makeIx(PING) export const makeGetBlock /* */ = makeIx(GET_BLOCK) export const makeGetBlockHeader /* */ = makeIx(GET_BLOCK_HEADER) @@ -234,9 +228,6 @@ export const isGetTransactionStatus /* */ = is(GET_TRANSACTION_STATUS) export const isGetTransaction /* */ = is(GET_TRANSACTION) export const isGetAccount /* */ = is(GET_ACCOUNT) export const isGetEvents /* */ = is(GET_EVENTS) -export const isGetLatestBlock /* */ = is(GET_LATEST_BLOCK) -export const isGetBlockById /* */ = is(GET_BLOCK_BY_ID) -export const isGetBlockByHeight /* */ = is(GET_BLOCK_BY_HEIGHT) export const isPing /* */ = is(PING) export const isGetBlock /* */ = is(GET_BLOCK) export const isGetBlockHeader /* */ = is(GET_BLOCK_HEADER) @@ -299,4 +290,4 @@ export const update = (key, fn = identity) => ix => { export const destroy = key => ix => { delete ix.assigns[key] return Ok(ix) -} +} \ No newline at end of file diff --git a/packages/sdk/src/latest-block/latest-block.js b/packages/sdk/src/latest-block/latest-block.js deleted file mode 100644 index 19e8b5254..000000000 --- a/packages/sdk/src/latest-block/latest-block.js +++ /dev/null @@ -1,20 +0,0 @@ -import {send} from "../send/send.js" -import {getBlock} from "../build/build-get-block" -import {decodeResponse as decode} from "../decode/decode.js" - -export function latestBlock(isSealed, opts) { - console.warn( - ` - %cFCL/SDK Deprecation Notice - ============================ - - "latestBlock()" is deprecated, please use "block()" for this and future versions of FCL - You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0008-deprecate-latest-block-method - - ============================ - `, - "font-weight:bold;font-family:monospace;" - ) - - return send([getBlock(isSealed)], opts).then(decode) -} diff --git a/packages/sdk/src/latest-block/latest-block.test.js b/packages/sdk/src/latest-block/latest-block.test.js deleted file mode 100644 index 6aba23242..000000000 --- a/packages/sdk/src/latest-block/latest-block.test.js +++ /dev/null @@ -1,4 +0,0 @@ -test("placeholder", () => { - expect(0).toBe(0) -}) - \ No newline at end of file diff --git a/packages/sdk/src/sdk.js b/packages/sdk/src/sdk.js index 3e9e0ca52..3335da886 100644 --- a/packages/sdk/src/sdk.js +++ b/packages/sdk/src/sdk.js @@ -23,9 +23,6 @@ export { isGetTransactionStatus, isGetAccount, isGetEvents, - isGetLatestBlock, - isGetBlockById, - isGetBlockByHeight, isPing, isGetBlock, isGetBlockHeader, @@ -37,7 +34,6 @@ export {template as cadence} from "@onflow/util-template" export {template as cdc} from "@onflow/util-template" // Helpers -export {latestBlock} from "./latest-block/latest-block.js" export {account} from "./account/account.js" export {block} from "./block/block.js" @@ -51,9 +47,6 @@ export {getEventsAtBlockHeightRange} from "./build/build-get-events-at-block-hei export {getEventsAtBlockIds} from "./build/build-get-events-at-block-ids" export {getBlock} from "./build/build-get-block.js" export {getBlockHeader} from "./build/build-get-block-header.js" -export {getLatestBlock} from "./build/build-get-latest-block.js" -export {getBlockById} from "./build/build-get-block-by-id.js" -export {getBlockByHeight} from "./build/build-get-block-by-height" export {getCollection} from "./build/build-get-collection" export {getTransactionStatus} from "./build/build-get-transaction-status.js" export {getTransaction} from "./build/build-get-transaction.js" diff --git a/packages/transport-grpc/src/sdk-send-grpc.js b/packages/transport-grpc/src/sdk-send-grpc.js index 2444ae6c2..08393d34a 100644 --- a/packages/transport-grpc/src/sdk-send-grpc.js +++ b/packages/transport-grpc/src/sdk-send-grpc.js @@ -4,7 +4,6 @@ export {sendGetBlockHeader} from "./send-get-block-header.js" export {sendGetBlock} from "./send-get-block.js" export {sendGetCollection} from "./send-get-collection.js" export {sendGetEvents} from "./send-get-events.js" -export {sendGetLatestBlock} from "./send-get-latest-block.js" export {sendGetTransaction} from "./send-get-transaction.js" export {sendGetTransactionStatus} from "./send-get-transaction-status.js" export {sendPing} from "./send-ping.js" diff --git a/packages/transport-grpc/src/send-get-block-by-height.js b/packages/transport-grpc/src/send-get-block-by-height.js deleted file mode 100644 index 0bd14a56f..000000000 --- a/packages/transport-grpc/src/send-get-block-by-height.js +++ /dev/null @@ -1,46 +0,0 @@ -import {invariant} from "@onflow/util-invariant" -import {GetBlockByHeightRequest, AccessAPI} from "@onflow/protobuf" -import {unary} from "./unary" - -const u8ToHex = (u8, context) => context.Buffer.from(u8).toString("hex") - -export async function sendGetBlockByHeight(ix, context = {}, opts = {}) { - invariant(opts.node, `SDK Send Get Block By Height Error: opts.node must be defined.`) - invariant(context.response, `SDK Send Get Block By Height Error: context.response must be defined.`) - invariant(context.Buffer, `SDK Send Get Block By Height Error: context.Buffer must be defined.`) - - ix = await ix - - const req = new GetBlockByHeightRequest() - req.setHeight(Number(ix.block.height)) - - const res = await unary(opts.node, AccessAPI.GetBlockByHeight, req, context) - - const block = res.getBlock() - - const collectionGuarantees = block.getCollectionGuaranteesList() - const blockSeals = block.getBlockSealsList() - const signatures = block.getSignaturesList() - - const ret = context.response() - ret.tag = ix.tag - ret.block = { - id: u8ToHex(block.getId_asU8(), context), - parentId: u8ToHex(block.getParentId_asU8(), context), - height: block.getHeight(), - timestamp: block.getTimestamp(), - collectionGuarantees: collectionGuarantees.map(collectionGuarantee => ({ - collectionId: u8ToHex(collectionGuarantee.getCollectionId_asU8(), context), - signatures: collectionGuarantee.getSignaturesList(), - })), - blockSeals: blockSeals.map(blockSeal => ({ - blockId: u8ToHex(blockSeal.getBlockId_asU8(), context), - executionReceiptId: u8ToHex(blockSeal.getExecutionReceiptId_asU8(), context), - executionReceiptSignatures: blockSeal.getExecutionReceiptSignaturesList(), - resultApprovalSignatures: blockSeal.getResultApprovalSignaturesList(), - })), - signatures: signatures, - } - - return ret -} diff --git a/packages/transport-grpc/src/send-get-block-by-id.js b/packages/transport-grpc/src/send-get-block-by-id.js deleted file mode 100644 index 7a03e76ba..000000000 --- a/packages/transport-grpc/src/send-get-block-by-id.js +++ /dev/null @@ -1,47 +0,0 @@ -import {invariant} from "@onflow/util-invariant" -import {GetBlockByIDRequest, AccessAPI} from "@onflow/protobuf" -import {unary} from "./unary" - -const u8ToHex = (u8, context) => context.Buffer.from(u8).toString("hex") -const hexBuffer = (hex, context) => context.Buffer.from(hex, "hex") - -export async function sendGetBlockById(ix, context = {}, opts = {}) { - invariant(opts.node, `SDK Send Get Block By ID Error: opts.node must be defined.`) - invariant(context.response, `SDK Send Get Block By ID Error: context.response must be defined.`) - invariant(context.Buffer, `SDK Send Get Block By ID Error: context.Buffer must be defined.`) - - ix = await ix - - const req = new GetBlockByIDRequest() - req.setId(hexBuffer(ix.block.id, context)) - - const res = await unary(opts.node, AccessAPI.GetBlockByID, req, context) - - const block = res.getBlock() - - const collectionGuarantees = block.getCollectionGuaranteesList() - const blockSeals = block.getBlockSealsList() - const signatures = block.getSignaturesList() - - const ret = context.response() - ret.tag = ix.tag - ret.block = { - id: u8ToHex(block.getId_asU8(), context), - parentId: u8ToHex(block.getParentId_asU8(), context), - height: block.getHeight(), - timestamp: block.getTimestamp(), - collectionGuarantees: collectionGuarantees.map(collectionGuarantee => ({ - collectionId: u8ToHex(collectionGuarantee.getCollectionId_asU8(), context), - signatures: collectionGuarantee.getSignaturesList(), - })), - blockSeals: blockSeals.map(blockSeal => ({ - blockId: u8ToHex(blockSeal.getBlockId_asU8(), context), - executionReceiptId: u8ToHex(blockSeal.getExecutionReceiptId_asU8(), context), - executionReceiptSignatures: blockSeal.getExecutionReceiptSignaturesList(), - resultApprovalSignatures: blockSeal.getResultApprovalSignaturesList(), - })), - signatures: signatures, - } - - return ret -} diff --git a/packages/transport-grpc/src/send-get-latest-block.js b/packages/transport-grpc/src/send-get-latest-block.js deleted file mode 100644 index 3ba0891c7..000000000 --- a/packages/transport-grpc/src/send-get-latest-block.js +++ /dev/null @@ -1,71 +0,0 @@ -import {invariant} from "@onflow/util-invariant" -import {GetLatestBlockRequest, AccessAPI} from "@onflow/protobuf" -import {unary} from "./unary" - -const u8ToHex = (u8, context) => context.Buffer.from(u8).toString("hex") - -const latestBlockDeprecationNotice = () => { - console.error( - ` - %c@onflow/send Deprecation Notice - ======================== - - Operating upon data of the latestBlock field of the interaction object is deprecated and will no longer be recognized in future releases of @onflow/send. - Find out more here: https://github.com/onflow/flow-js-sdk/blob/master/packages/send/WARNINGS.md#0001-Deprecating-latestBlock-field - - ======================= - ` - .replace(/\n\s+/g, "\n") - .trim(), - "font-weight:bold;font-family:monospace;" - ) -} - -export async function sendGetLatestBlock(ix, context = {}, opts = {}) { - invariant(opts.node, `SDK Send Get Latest Block Error: opts.node must be defined.`) - invariant(context.response, `SDK Send Get Latest Block Error: context.response must be defined.`) - invariant(context.Buffer, `SDK Send Get Latest Block Error: context.Buffer must be defined.`) - - ix = await ix - - const req = new GetLatestBlockRequest() - - if (ix.latestBlock && ix.latestBlock.isSealed) { - req.setIsSealed(ix.latestBlock.isSealed) - latestBlockDeprecationNotice() - } - - if (ix.block && ix.block.isSealed) { - req.setIsSealed(ix.block.isSealed) - } - - const res = await unary(opts.node, AccessAPI.GetLatestBlock, req, context) - - const block = res.getBlock() - - const collectionGuarantees = block.getCollectionGuaranteesList() - const blockSeals = block.getBlockSealsList() - const signatures = block.getSignaturesList() - - const ret = context.response() - ret.tag = ix.tag - ret.block = { - id: u8ToHex(block.getId_asU8(), context), - parentId: u8ToHex(block.getParentId_asU8(), context), - height: block.getHeight(), - timestamp: block.getTimestamp(), - collectionGuarantees: collectionGuarantees.map(collectionGuarantee => ({ - collectionId: u8ToHex(collectionGuarantee.getCollectionId_asU8(), context), - signatures: collectionGuarantee.getSignaturesList(), - })), - blockSeals: blockSeals.map(blockSeal => ({ - blockId: u8ToHex(blockSeal.getBlockId_asU8(), context), - executionReceiptId: u8ToHex(blockSeal.getExecutionReceiptId_asU8(), context), - executionReceiptSignatures: blockSeal.getExecutionReceiptSignaturesList(), - resultApprovalSignatures: blockSeal.getResultApprovalSignaturesList(), - })), - signatures: signatures, - } - - return ret -} diff --git a/packages/transport-grpc/src/send-grpc.js b/packages/transport-grpc/src/send-grpc.js index 4e5469f65..cb705b87b 100644 --- a/packages/transport-grpc/src/send-grpc.js +++ b/packages/transport-grpc/src/send-grpc.js @@ -7,9 +7,6 @@ import {sendGetAccount} from "./send-get-account.js" import {sendGetEvents} from "./send-get-events.js" import {sendGetBlock} from "./send-get-block.js" import {sendGetBlockHeader} from "./send-get-block-header.js" -import {sendGetLatestBlock} from "./send-get-latest-block.js" -import {sendGetBlockById} from "./send-get-block-by-id.js" -import {sendGetBlockByHeight} from "./send-get-block-by-height.js" import {sendGetCollection} from "./send-get-collection.js" import {sendPing} from "./send-ping.js" @@ -33,16 +30,10 @@ export const send = async (ix, context = {}, opts = {}) => { return opts.sendGetAccount ? opts.sendGetAccount(ix, context, opts) : sendGetAccount(ix, context, opts) case context.ix.isGetEvents(ix): return opts.sendGetEvents ? opts.sendGetEvents(ix, context, opts) : sendGetEvents(ix, context, opts) - case context.ix.isGetLatestBlock(ix): - return opts.sendGetLatestBlock ? opts.sendGetLatestBlock(ix, context, opts) : sendGetLatestBlock(ix, context, opts) case context.ix.isGetBlock(ix): return opts.sendGetBlock ? opts.sendGetBlock(ix, context, opts) : sendGetBlock(ix, context, opts) case context.ix.isGetBlockHeader(ix): return opts.sendGetBlockHeader ? opts.sendGetBlockHeader(ix, context, opts) : sendGetBlockHeader(ix, context, opts) - case context.ix.isGetBlockById(ix): - return opts.sendGetBlockById ? opts.sendGetBlockById(ix, context, opts) : sendGetBlockById(ix, context, opts) - case context.ix.isGetBlockByHeight(ix): - return opts.sendGetBlockByHeight ? opts.sendGetBlockByHeight(ix, context, opts) : sendGetBlockByHeight(ix, context, opts) case context.ix.isGetCollection(ix): return opts.sendGetCollection ? opts.sendGetCollection(ix, context, opts) : sendGetCollection(ix, context, opts) case context.ix.isPing(ix): diff --git a/packages/transport-http/src/sdk-send-http.js b/packages/transport-http/src/sdk-send-http.js index 0ebf30d2e..ab90a4a73 100644 --- a/packages/transport-http/src/sdk-send-http.js +++ b/packages/transport-http/src/sdk-send-http.js @@ -4,7 +4,6 @@ export {sendGetBlockHeader} from "./send-get-block-header.js" export {sendGetBlock} from "./send-get-block.js" export {sendGetCollection} from "./send-get-collection.js" export {sendGetEvents} from "./send-get-events.js" -export {sendGetLatestBlock} from "./send-get-latest-block.js" export {sendGetTransaction} from "./send-get-transaction.js" export {sendGetTransactionStatus} from "./send-get-transaction-status.js" export {sendPing} from "./send-ping.js" diff --git a/packages/transport-http/src/send-get-latest-block.js b/packages/transport-http/src/send-get-latest-block.js deleted file mode 100644 index 67a9f5d95..000000000 --- a/packages/transport-http/src/send-get-latest-block.js +++ /dev/null @@ -1,63 +0,0 @@ -import {invariant} from "@onflow/util-invariant" - -const latestBlockDeprecationNotice = () => { - console.error( - ` - %c@onflow/send Deprecation Notice - ======================== - - Operating upon data of the latestBlock field of the interaction object is deprecated and will no longer be recognized in future releases of @onflow/send. - Find out more here: https://github.com/onflow/flow-js-sdk/blob/master/packages/send/WARNINGS.md#0001-Deprecating-latestBlock-field - - ======================= - ` - .replace(/\n\s+/g, "\n") - .trim(), - "font-weight:bold;font-family:monospace;" - ) -} - -export async function sendGetLatestBlock(ix, context = {}, opts = {}) { - invariant(opts.node, `SDK Send Get Latest Block Error: opts.node must be defined.`) - invariant(context.response, `SDK Send Get Latest Block Error: context.response must be defined.`) - - ix = await ix - - if (ix.latestBlock && ix.latestBlock.isSealed) { - latestBlockDeprecationNotice() - } - - const height = ix.latestBlock?.isSealed || ix.block?.isSealed - ? "sealed" - : "final" - - const res = await httpRequest({ - hostname: opts.node, - path: `/v1/blocks?height=${height}&expand=payload`, - method: "GET", - body: null - }) - - const ret = context.response() - ret.tag = ix.tag - ret.block = { - id: block.header.id, - parentId: block.header.parent_id, - height: Number(block.header.height), - timestamp: block.header.timestamp, - collectionGuarantees: block.payload.collection_guarantees.map(collectionGuarantee => ({ - collectionId: collectionGuarantee.collection_id, - signerIds: collectionGuarantee.signer_ids, - signatures: collectionGuarantee.signature ? [collectionGuarantee.signature] : [], - })), - blockSeals: block.payload.block_seals.map(blockSeal => ({ - blockId: blockSeal.block_id, - executionReceiptId: blockSeal.result_id, - executionReceiptSignatures: [], - resultApprovalSignatures: [], - })), - signatures: [] - } - - return ret -} diff --git a/packages/transport-http/src/send-http.js b/packages/transport-http/src/send-http.js index e3acc0293..530baab6c 100644 --- a/packages/transport-http/src/send-http.js +++ b/packages/transport-http/src/send-http.js @@ -7,7 +7,6 @@ import {sendGetAccount} from "./send-get-account.js" import {sendGetEvents} from "./send-get-events.js" import {sendGetBlock} from "./send-get-block.js" import {sendGetBlockHeader} from "./send-get-block-header.js" -import {sendGetLatestBlock} from "./send-get-latest-block.js" import {sendGetCollection} from "./send-get-collection.js" import {sendPing} from "./send-ping.js" @@ -31,8 +30,6 @@ export const send = async (ix, context = {}, opts = {}) => { return opts.sendGetAccount ? opts.sendGetAccount(ix, context, opts) : sendGetAccount(ix, context, opts) case context.ix.isGetEvents(ix): return opts.sendGetEvents ? opts.sendGetEvents(ix, context, opts) : sendGetEvents(ix, context, opts) - case context.ix.isGetLatestBlock(ix): - return opts.sendGetLatestBlock ? opts.sendGetLatestBlock(ix, context, opts) : sendGetLatestBlock(ix, context, opts) case context.ix.isGetBlock(ix): return opts.sendGetBlock ? opts.sendGetBlock(ix, context, opts) : sendGetBlock(ix, context, opts) case context.ix.isGetBlockHeader(ix):