Skip to content

Commit

Permalink
chore: minor
Browse files Browse the repository at this point in the history
  • Loading branch information
bangjelkoski committed Sep 20, 2024
1 parent 5e3cac2 commit b3c20ab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/sdk-ts/src/core/accounts/PrivateKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { signTypedData, SignTypedDataVersion } from '@metamask/eth-sig-util'
import { recoverTypedSignaturePubKey } from '../../utils'
import {
CosmosTxV1Beta1Tx,
InjectiveTypesV1TxExt,
InjectiveTypesV1Beta1TxExt,
} from '@injectivelabs/core-proto-ts'
import { getTransactionPartsFromTxRaw } from '../modules/tx/utils/tx'
import { getEip712TypedData, MsgDecoder } from '../modules/tx/eip712'
Expand Down Expand Up @@ -360,7 +360,7 @@ export class PrivateKey {
}

const decodedExtension =
InjectiveTypesV1TxExt.ExtensionOptionsWeb3Tx.decode(extension.value)
InjectiveTypesV1Beta1TxExt.ExtensionOptionsWeb3Tx.decode(extension.value)

const ethereumChainId = Number(
decodedExtension.typedDataChainID,
Expand Down
8 changes: 4 additions & 4 deletions packages/sdk-ts/src/core/modules/tx/utils/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
GoogleProtobufAny,
CosmosTxV1Beta1Tx,
CosmosBaseV1Beta1Coin,
InjectiveTypesV1TxExt,
InjectiveTypesV1Beta1TxExt,
CosmosCryptoSecp256k1Keys,
CosmosTxSigningV1Beta1Signing,
} from '@injectivelabs/core-proto-ts'
Expand Down Expand Up @@ -200,11 +200,11 @@ export const createSignDocFromTransaction = (args: {

export const createTxRawEIP712 = (
txRaw: CosmosTxV1Beta1Tx.TxRaw,
extension: InjectiveTypesV1TxExt.ExtensionOptionsWeb3Tx,
extension: InjectiveTypesV1Beta1TxExt.ExtensionOptionsWeb3Tx,
) => {
const body = CosmosTxV1Beta1Tx.TxBody.decode(txRaw.bodyBytes)
const extensionAny = createAny(
InjectiveTypesV1TxExt.ExtensionOptionsWeb3Tx.encode(extension).finish(),
InjectiveTypesV1Beta1TxExt.ExtensionOptionsWeb3Tx.encode(extension).finish(),
'/injective.types.v1beta1.ExtensionOptionsWeb3Tx',
)

Expand All @@ -224,7 +224,7 @@ export const createWeb3Extension = ({
feePayer?: string
feePayerSig?: Uint8Array
}) => {
const web3Extension = InjectiveTypesV1TxExt.ExtensionOptionsWeb3Tx.create()
const web3Extension = InjectiveTypesV1Beta1TxExt.ExtensionOptionsWeb3Tx.create()
web3Extension.typedDataChainID = ethereumChainId.toString()

if (feePayer) {
Expand Down
4 changes: 0 additions & 4 deletions proto/core/gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ BUILD_DIR=$ROOT_DIR/gen
PROTO_DIR=$ROOT_DIR/proto
TS_OUTPUT_DIR=$ROOT_DIR/proto-ts
TS_STUB_DIR=$ROOT_DIR/stub
TS_PROTO_TEMPLATE=$PROTO_DIR/buf.gen.ts.yaml

# remote branches/tags
injective_core_branch=master
Expand All @@ -19,9 +18,6 @@ rm -rf $BUILD_DIR
rm -rf $PROTO_DIR
rm -rf $TS_OUTPUT_DIR

# BSD rate limit
counter=0

########################################
######## TS PROTO GENERATION ###########
########################################
Expand Down
2 changes: 1 addition & 1 deletion proto/core/stub/index.ts.template
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export * as InjectiveTokenFactoryV1Beta1Tx from "./injective/tokenfactory/v1beta
export * as InjectiveTokenFactoryV1Beta1Events from "./injective/tokenfactory/v1beta1/events";
export * as InjectiveTokenFactoryV1Beta1AuthorityMetadata from "./injective/tokenfactory/v1beta1/authorityMetadata";
export * as InjectiveTypesV1Beta1Account from "./injective/types/v1beta1/account";
export * as InjectiveTypesV1TxExt from "./injective/types/v1beta1/tx_ext";
export * as InjectiveTypesV1Beta1TxExt from "./injective/types/v1beta1/tx_ext";
export * as InjectiveTypesV1TxResponse from "./injective/types/v1beta1/tx_response";
export * as InjectiveWasmxV1Beta1Genesis from "./injective/wasmx/v1/genesis";
export * as InjectiveWasmxV1Beta1Query from "./injective/wasmx/v1/query";
Expand Down

0 comments on commit b3c20ab

Please sign in to comment.