diff --git a/.github/workflows/explorer-client-prs.yml b/.github/workflows/explorer-client-prs.yml index b50efcf43af70..55825793be06c 100644 --- a/.github/workflows/explorer-client-prs.yml +++ b/.github/workflows/explorer-client-prs.yml @@ -29,7 +29,7 @@ jobs: run: yarn install; yarn build - name: Install yarn dependencies working-directory: ./explorer/client - run: yarn install + run: yarn install --force - name: Lint working-directory: ./explorer/client run: yarn lint diff --git a/explorer/client/src/pages/transaction-result/TransactionResult.tsx b/explorer/client/src/pages/transaction-result/TransactionResult.tsx index 9bb5b66008f13..395bb57eefeb6 100644 --- a/explorer/client/src/pages/transaction-result/TransactionResult.tsx +++ b/explorer/client/src/pages/transaction-result/TransactionResult.tsx @@ -45,7 +45,7 @@ const initState: TxnState = { data: { kind: { Single: { - Transfer: { + TransferCoin: { recipient: '', object_ref: ['', 0, ''], }, diff --git a/explorer/client/src/pages/transaction-result/TransactionView.tsx b/explorer/client/src/pages/transaction-result/TransactionView.tsx index d1713fdad9a4a..bc0fb10c2f786 100644 --- a/explorer/client/src/pages/transaction-result/TransactionView.tsx +++ b/explorer/client/src/pages/transaction-result/TransactionView.tsx @@ -112,7 +112,7 @@ function formatByTransactionKind( data: TransactionData ) { switch (kind) { - case 'Transfer': + case 'TransferCoin': const transfer = getTransferTransaction(data)!; return [ { diff --git a/explorer/client/src/utils/static/mock_data.json b/explorer/client/src/utils/static/mock_data.json index f29489e448200..dc2e71686bf6d 100644 --- a/explorer/client/src/utils/static/mock_data.json +++ b/explorer/client/src/utils/static/mock_data.json @@ -861,7 +861,7 @@ "data": { "kind": { "Single": { - "Transfer": { + "TransferCoin": { "recipient": "receiverAddress", "object_ref": [ "7bc832ec31709638cd8d9323e90edf332gff4389", @@ -961,7 +961,7 @@ "data": { "kind": { "Single": { - "Transfer": { + "TransferCoin": { "recipient": "receiverAddress", "object_ref": [ "7bc832ec31709638cd8d9323e90edf332gff4389", diff --git a/sdk/typescript/src/index.guard.ts b/sdk/typescript/src/index.guard.ts index 1521c566f5438..77e3ae70c5e12 100644 --- a/sdk/typescript/src/index.guard.ts +++ b/sdk/typescript/src/index.guard.ts @@ -5,7 +5,7 @@ * Generated type guards for "index.ts". * WARNING: Do not manually change this file. */ -import { Ed25519KeypairData, Keypair, PublicKeyInitData, PublicKeyData, TransferCoinTransaction, TxnDataSerializer, TransactionDigest, SuiAddress, ObjectOwner, ObjectRef, ObjectContentField, ObjectContentFields, ObjectContent, MovePackageContent, SuiObject, ObjectExistsInfo, ObjectNotExistsInfo, ObjectStatus, ObjectType, GetOwnedObjectRefsResponse, GetObjectInfoResponse, ObjectDigest, ObjectId, SequenceNumber, RawObjectRef, Transfer, RawAuthoritySignInfo, TransactionKindName, SingleTransactionKind, TransactionKind, TransactionData, EpochId, AuthorityQuorumSignInfo, CertifiedTransaction, GasCostSummary, ExecutionStatusType, ExecutionStatus, ExecutionStatusDetail, OwnedObjectRef, TransactionEffects, TransactionEffectsResponse, GatewayTxSeqNumber, GetTxnDigestsResponse, MoveModulePublish, Event, StructTag, MoveTypeTag, MoveCall, MoveCallArg, EmptySignInfo, AuthorityName, AuthoritySignature, TransactionBytes, TransactionResponse, SignedTransaction } from "./index"; +import { Ed25519KeypairData, Keypair, PublicKeyInitData, PublicKeyData, TransferCoinTransaction, TxnDataSerializer, TransactionDigest, SuiAddress, ObjectOwner, ObjectRef, ObjectContentField, ObjectContentFields, ObjectContent, MovePackageContent, SuiObject, ObjectExistsInfo, ObjectNotExistsInfo, ObjectStatus, ObjectType, GetOwnedObjectRefsResponse, GetObjectInfoResponse, ObjectDigest, ObjectId, SequenceNumber, RawObjectRef, TransferCoin, RawAuthoritySignInfo, TransactionKindName, SingleTransactionKind, TransactionKind, TransactionData, EpochId, AuthorityQuorumSignInfo, CertifiedTransaction, GasCostSummary, ExecutionStatusType, ExecutionStatus, ExecutionStatusDetail, OwnedObjectRef, TransactionEffects, TransactionEffectsResponse, GatewayTxSeqNumber, GetTxnDigestsResponse, MoveModulePublish, Event, StructTag, MoveTypeTag, MoveCall, MoveCallArg, EmptySignInfo, AuthorityName, AuthoritySignature, TransactionBytes, TransactionResponse, SignedTransaction } from "./index"; import { BN } from "bn.js"; export function isEd25519KeypairData(obj: any, _argumentName?: string): obj is Ed25519KeypairData { @@ -259,7 +259,7 @@ export function isRawObjectRef(obj: any, _argumentName?: string): obj is RawObje ) } -export function isTransfer(obj: any, _argumentName?: string): obj is Transfer { +export function isTransferCoin(obj: any, _argumentName?: string): obj is TransferCoin { return ( (obj !== null && typeof obj === "object" || @@ -279,7 +279,7 @@ export function isRawAuthoritySignInfo(obj: any, _argumentName?: string): obj is export function isTransactionKindName(obj: any, _argumentName?: string): obj is TransactionKindName { return ( - (obj === "Transfer" || + (obj === "TransferCoin" || obj === "Publish" || obj === "Call") ) @@ -290,7 +290,7 @@ export function isSingleTransactionKind(obj: any, _argumentName?: string): obj i ((obj !== null && typeof obj === "object" || typeof obj === "function") && - isTransfer(obj.Transfer) as boolean || + isTransferCoin(obj.TransferCoin) as boolean || (obj !== null && typeof obj === "object" || typeof obj === "function") && diff --git a/sdk/typescript/src/types/transactions.ts b/sdk/typescript/src/types/transactions.ts index 6838fe0507058..59b18ad894851 100644 --- a/sdk/typescript/src/types/transactions.ts +++ b/sdk/typescript/src/types/transactions.ts @@ -4,15 +4,15 @@ import { ObjectOwner, SuiAddress, TransactionDigest } from './common'; import { ObjectId, RawObjectRef } from './objects'; -export type Transfer = { +export type TransferCoin = { recipient: string; object_ref: RawObjectRef; }; export type RawAuthoritySignInfo = [AuthorityName, AuthoritySignature]; -export type TransactionKindName = 'Transfer' | 'Publish' | 'Call'; +export type TransactionKindName = 'TransferCoin' | 'Publish' | 'Call'; export type SingleTransactionKind = - | { Transfer: Transfer } + | { TransferCoin: TransferCoin } | { Publish: MoveModulePublish } | { Call: MoveCall }; export type TransactionKind = @@ -146,9 +146,9 @@ export function getSingleTransactionKind( export function getTransferTransaction( data: TransactionData -): Transfer | undefined { +): TransferCoin | undefined { const tx = getSingleTransactionKind(data); - return tx && 'Transfer' in tx ? tx.Transfer : undefined; + return tx && 'TransferCoin' in tx ? tx.TransferCoin : undefined; } export function getPublishTransaction(