Skip to content

Commit

Permalink
Merge pull request #295 from multiversx/proto-import
Browse files Browse the repository at this point in the history
Workaround: fix import of "proto"
  • Loading branch information
andreibancioiu authored May 12, 2023
2 parents b5998e7 + e23cad2 commit 315bde0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@multiversx/sdk-core",
"version": "12.2.0",
"version": "12.2.1",
"description": "MultiversX SDK for JavaScript and TypeScript",
"main": "out/index.js",
"types": "out/index.d.js",
Expand Down
3 changes: 2 additions & 1 deletion src/proto/serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as errors from "../errors";
import { ITransactionValue } from "../interface";
import { bigIntToBuffer } from "../smartcontracts/codec/utils";
import { Transaction } from "../transaction";
import { proto } from "./compiled";

/**
* Hides away the serialization complexity, for each type of object (e.g. transactions).
Expand All @@ -16,6 +16,7 @@ export class ProtoSerializer {
* Serializes a Transaction object to a Buffer. Handles low-level conversion logic and field-mappings as well.
*/
serializeTransaction(transaction: Transaction): Buffer {
const proto = require("./compiled").proto;
const receiverPubkey = new Address(transaction.getReceiver().bech32()).pubkey();
const senderPubkey = new Address(transaction.getSender().bech32()).pubkey();

Expand Down

0 comments on commit 315bde0

Please sign in to comment.