Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions modules/sdk-coin-sol/src/sol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import {
UnexpectedAddressError,
EDDSAUtils,
} from '@bitgo/sdk-core';
import { auditEddsaPrivateKey, deriveUnhardenedMps, getDerivationPath } from '@bitgo/sdk-lib-mpc';
import { auditEddsaPrivateKey, getDerivationPath } from '@bitgo/sdk-lib-mpc';
import { BaseNetwork, CoinFamily, coins, SolCoin, BaseCoin as StaticsBaseCoin } from '@bitgo/statics';
import {
KeyPair as SolKeyPair,
Expand Down Expand Up @@ -1705,9 +1705,9 @@ export class Sol extends BaseCoin {

const index = params.index || 0;
const currPath = params.seed ? getDerivationPath(params.seed) + `/${index}` : `m/${index}`;
const accountId = isMpcV2
? deriveUnhardenedMps(bitgoKey, currPath).slice(0, 64)
: (await EDDSAMethods.getInitializedMpcInstance()).deriveUnhardened(bitgoKey, currPath).slice(0, 64);
const accountId = (await EDDSAMethods.getInitializedMpcInstance())
.deriveUnhardened(bitgoKey, currPath)
.slice(0, 64);
const bs58EncodedPublicKey = new SolKeyPair({ pub: accountId }).getAddress();

const blockhash = await this.getBlockhash(params.apiKey);
Expand Down Expand Up @@ -1826,9 +1826,9 @@ export class Sol extends BaseCoin {
const baseAddressPath = params.seed
? getDerivationPath(params.seed) + `/${baseAddressIndex}`
: `m/${baseAddressIndex}`;
const baseAccountId = isMpcV2
? deriveUnhardenedMps(bitgoKey, baseAddressPath).slice(0, 64)
: (await EDDSAMethods.getInitializedMpcInstance()).deriveUnhardened(bitgoKey, baseAddressPath).slice(0, 64);
const baseAccountId = (await EDDSAMethods.getInitializedMpcInstance())
.deriveUnhardened(bitgoKey, baseAddressPath)
.slice(0, 64);
const baseAddress = new SolKeyPair({ pub: baseAccountId }).getAddress();

let durableNoncePubKeysIndex = 0;
Expand Down
4 changes: 2 additions & 2 deletions modules/sdk-coin-sol/test/unit/sol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
Wallet,
WalletCoinSpecific,
} from '@bitgo/sdk-core';
import { deriveUnhardenedMps, MPSUtil } from '@bitgo/sdk-lib-mpc';
import { MPSUtil } from '@bitgo/sdk-lib-mpc';
import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test';
import { coins } from '@bitgo/statics';
import {
Expand Down Expand Up @@ -3971,7 +3971,7 @@ describe('SOL:', function () {
mpcV2TokenCommonKeyChain = tokenUserDkg.getCommonKeychain();

mpcV2TokenBaseAddress = new KeyPair({
pub: deriveUnhardenedMps(mpcV2TokenCommonKeyChain, 'm/0').slice(0, 64),
pub: mpc.deriveUnhardened(mpcV2TokenCommonKeyChain, 'm/0').slice(0, 64),
}).getAddress();
mpcV2TokenAddress1 = new KeyPair({
pub: mpc.deriveUnhardened(mpcV2TokenCommonKeyChain, 'm/1').slice(0, 64),
Expand Down
Loading