Skip to content

Commit 2e4089c

Browse files
fix(root): merge conflicts
TICKET: WP-0000
2 parents 38febe8 + 165d4f4 commit 2e4089c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+2287
-610
lines changed

modules/account-lib/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
"@bitgo/sdk-core": "^35.2.0",
8686
"@bitgo/sdk-lib-mpc": "^10.5.0",
8787
"@bitgo/statics": "^54.2.0",
88+
"@bitgo/sdk-coin-vet": "^1.3.0",
8889
"bignumber.js": "^9.1.1",
8990
"bs58": "^4.0.1"
9091
},

modules/account-lib/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,9 @@ export { Stt };
191191
import * as Soneium from '@bitgo/sdk-coin-soneium';
192192
export { Soneium };
193193

194+
import * as Vet from '@bitgo/sdk-coin-vet';
195+
export { Vet };
196+
194197
const coinBuilderMap = {
195198
trx: Trx.WrappedBuilder,
196199
ttrx: Trx.WrappedBuilder,
@@ -301,6 +304,8 @@ const coinBuilderMap = {
301304
tsoneium: Soneium.TransactionBuilder,
302305
polyx: Polyx.TransactionBuilderFactory,
303306
tpolyx: Polyx.TransactionBuilderFactory,
307+
vet: Vet.TransactionBuilderFactory,
308+
tvet: Vet.TransactionBuilderFactory,
304309
};
305310

306311
/**

modules/sdk-coin-sol/src/lib/utils.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,12 +544,14 @@ export async function getAssociatedTokenAccountAddress(
544544
}
545545

546546
const coin = getSolTokenFromAddressOnly(tokenMintAddress);
547-
if (!coin || !(coin instanceof SolCoin)) {
548-
throw new UtilsError(`Token not found or not a Solana token: ${tokenMintAddress}`);
547+
let ataAddress: PublicKey;
548+
let programId: string;
549+
if (coin && coin instanceof SolCoin && (coin as any).programId) {
550+
programId = (coin as any).programId.toString();
551+
} else {
552+
programId = TOKEN_PROGRAM_ID.toString();
549553
}
550554

551-
let ataAddress: PublicKey;
552-
const programId = coin.programId;
553555
if (programId === TOKEN_2022_PROGRAM_ID.toString()) {
554556
ataAddress = await getAssociatedTokenAddress(mintPublicKey, ownerPublicKey, false, TOKEN_2022_PROGRAM_ID);
555557
} else {

modules/sdk-coin-vet/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@
4646
"@bitgo/statics": "^54.2.0",
4747
"bignumber.js": "^9.1.1",
4848
"ethereumjs-util": "7.1.5",
49-
"tweetnacl": "^1.0.3"
49+
"tweetnacl": "^1.0.3",
50+
"lodash": "^4.17.21",
51+
"@vechain/sdk-core": "^1.2.0-rc.3",
52+
"@noble/curves": "1.8.1"
5053
},
5154
"devDependencies": {
5255
"@bitgo/sdk-api": "^1.63.4",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
import {
2+
TransactionExplanation as BaseTransactionExplanation,
3+
TransactionType as BitGoTransactionType,
4+
} from '@bitgo/sdk-core';
5+
16
/**
27
* The transaction data returned from the toJson() function of a transaction
38
*/
49
export interface TxData {
510
id: string;
611
}
12+
13+
export interface VetTransactionExplanation extends BaseTransactionExplanation {
14+
sender?: string;
15+
type?: BitGoTransactionType;
16+
}

modules/sdk-coin-vet/src/lib/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import * as Utils from './utils';
33
import * as Interface from './iface';
44

55
export { KeyPair } from './keyPair';
6-
export { Transaction } from './transaction';
7-
export { TransactionBuilder } from './transactionBuilder';
8-
export { TransferBuilder } from './transferBuilder';
6+
export { Transaction } from './transaction/transaction';
7+
export { TransactionBuilder } from './transactionBuilder/transactionBuilder';
8+
export { TransferBuilder } from './transactionBuilder/transferBuilder';
99
export { TransactionBuilderFactory } from './transactionBuilderFactory';
1010
export { Constants, Utils, Interface };

modules/sdk-coin-vet/src/lib/transaction.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)