Skip to content

Commit

Permalink
chore: update conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
stanleyyconsensys committed Apr 10, 2024
1 parent 065cc40 commit 213b2e2
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion packages/starknet-snap/test/constants.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { JsonBIP44CoinTypeNode } from '@metamask/key-tree';
import { num } from 'starknet';
import { num, constants } from 'starknet';
import {
AccContract,
Erc20Token,
Expand Down
10 changes: 5 additions & 5 deletions packages/starknet-snap/test/src/declareContract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Test function: declareContract', function () {
};

const requestObject: DeclareContractRequestParams = {
chainId: STARKNET_TESTNET_NETWORK.chainId,
chainId: STARKNET_SEPOLIA_TESTNET_NETWORK.chainId,
senderAddress: account1.address,
contractPayload: {
contract: 'TestContract',
Expand Down Expand Up @@ -63,7 +63,7 @@ describe('Test function: declareContract', function () {
const result = await declareContract(apiParams);
const { privateKey } = await utils.getKeysFromAddress(
apiParams.keyDeriver,
STARKNET_TESTNET_NETWORK,
STARKNET_SEPOLIA_TESTNET_NETWORK,
state,
account1.address,
);
Expand All @@ -74,7 +74,7 @@ describe('Test function: declareContract', function () {
});
expect(declareContractStub).to.have.been.calledOnce;
expect(declareContractStub).to.have.been.calledWith(
STARKNET_TESTNET_NETWORK,
STARKNET_SEPOLIA_TESTNET_NETWORK,
account1.address,
privateKey,
{ contract: 'TestContract' },
Expand All @@ -86,7 +86,7 @@ describe('Test function: declareContract', function () {
const declareContractStub = sandbox.stub(utils, 'declareContract').rejects('error');
const { privateKey } = await utils.getKeysFromAddress(
apiParams.keyDeriver,
STARKNET_TESTNET_NETWORK,
STARKNET_SEPOLIA_TESTNET_NETWORK,
state,
account1.address,
);
Expand All @@ -99,7 +99,7 @@ describe('Test function: declareContract', function () {
expect(result).to.be.an('Error');
expect(declareContractStub).to.have.been.calledOnce;
expect(declareContractStub).to.have.been.calledWith(
STARKNET_TESTNET_NETWORK,
STARKNET_SEPOLIA_TESTNET_NETWORK,
account1.address,
privateKey,
{ contract: 'TestContract' },
Expand Down
4 changes: 2 additions & 2 deletions packages/starknet-snap/test/src/extractPrivateKey.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('Test function: extractPrivateKey', function () {
} catch (err) {
result = err;
} finally {
expect(isUpgradeRequiredStub).to.have.been.calledOnceWith(STARKNET_TESTNET_NETWORK, account1.address);
expect(isUpgradeRequiredStub).to.have.been.calledOnceWith(STARKNET_SEPOLIA_TESTNET_NETWORK, account1.address);
expect(result).to.be.an('Error');
}
});
Expand All @@ -115,7 +115,7 @@ describe('Test function: extractPrivateKey', function () {
} catch (err) {
result = err;
} finally {
expect(isUpgradeRequiredStub).to.have.been.calledOnceWith(STARKNET_TESTNET_NETWORK, account1.address);
expect(isUpgradeRequiredStub).to.have.been.calledOnceWith(STARKNET_SEPOLIA_TESTNET_NETWORK, account1.address);
expect(result).to.be.an('Error');
}
});
Expand Down
4 changes: 2 additions & 2 deletions packages/starknet-snap/test/src/extractPublicKey.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('Test function: extractPublicKey', function () {
} catch (err) {
result = err;
} finally {
expect(isUpgradeRequiredStub).to.have.been.calledOnceWith(STARKNET_TESTNET_NETWORK, account1.address);
expect(isUpgradeRequiredStub).to.have.been.calledOnceWith(STARKNET_SEPOLIA_TESTNET_NETWORK, account1.address);
expect(result).to.be.an('Error');
}
});
Expand All @@ -114,7 +114,7 @@ describe('Test function: extractPublicKey', function () {
} catch (err) {
result = err;
} finally {
expect(isUpgradeRequiredStub).to.have.been.calledOnceWith(STARKNET_TESTNET_NETWORK, account1.address);
expect(isUpgradeRequiredStub).to.have.been.calledOnceWith(STARKNET_SEPOLIA_TESTNET_NETWORK, account1.address);
expect(result).to.be.an('Error');
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Test function: signDeclareTransaction', function () {
};

const requestObject: SignDeclareTransactionRequestParams = {
chainId: STARKNET_TESTNET_NETWORK.chainId,
chainId: STARKNET_SEPOLIA_TESTNET_NETWORK.chainId,
signerAddress: account1.address,
transaction: {
classHash: '0x025ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Test function: signDeployAccountTransaction', function () {
};

const requestObject: SignDeployAccountTransactionRequestParams = {
chainId: STARKNET_TESTNET_NETWORK.chainId,
chainId: STARKNET_SEPOLIA_TESTNET_NETWORK.chainId,
signerAddress: account1.address,
transaction: {
classHash: '0x025ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918',
Expand Down
2 changes: 1 addition & 1 deletion packages/starknet-snap/test/src/signTransaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Test function: signMessage', function () {
};

const requestObject: SignTransactionRequestParams = {
chainId: STARKNET_TESTNET_NETWORK.chainId,
chainId: STARKNET_SEPOLIA_TESTNET_NETWORK.chainId,
signerAddress: account1.address,
transactions: [
{
Expand Down
12 changes: 6 additions & 6 deletions packages/starknet-snap/test/src/upgradeAccContract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as utils from '../../src/utils/starknetUtils';
import * as snapUtils from '../../src/utils/snapUtils';
import { SnapState, VoyagerTransactionType, TransactionStatus } from '../../src/types/snapState';
import { upgradeAccContract } from '../../src/upgradeAccContract';
import { STARKNET_TESTNET_NETWORK } from '../../src/utils/constants';
import { STARKNET_SEPOLIA_TESTNET_NETWORK } from '../../src/utils/constants';
import { account1, estimateFeeResp, getBip44EntropyStub, sendTransactionResp } from '../constants.test';
import { getAddressKeyDeriver } from '../../src/utils/keyPair';
import { Mutex } from 'async-mutex';
Expand All @@ -28,7 +28,7 @@ describe('Test function: upgradeAccContract', function () {
beforeEach(async function () {
const requestObject = {
contractAddress: account1.address,
chainId: STARKNET_TESTNET_NETWORK.chainId,
chainId: STARKNET_SEPOLIA_TESTNET_NETWORK.chainId,
};

walletStub = new WalletMock();
Expand All @@ -37,7 +37,7 @@ describe('Test function: upgradeAccContract', function () {
state = {
accContracts: [account1],
erc20Tokens: [],
networks: [STARKNET_TESTNET_NETWORK],
networks: [STARKNET_SEPOLIA_TESTNET_NETWORK],
transactions: [],
};

Expand Down Expand Up @@ -154,7 +154,7 @@ describe('Test function: upgradeAccContract', function () {

expect(executeTxnStub).to.calledOnce;
expect(executeTxnStub).to.calledWith(
STARKNET_TESTNET_NETWORK,
STARKNET_SEPOLIA_TESTNET_NETWORK,
address,
'pk',
txnInvocation,
Expand Down Expand Up @@ -188,7 +188,7 @@ describe('Test function: upgradeAccContract', function () {

expect(executeTxnStub).to.calledOnce;
expect(executeTxnStub).to.calledWith(
STARKNET_TESTNET_NETWORK,
STARKNET_SEPOLIA_TESTNET_NETWORK,
address,
'pk',
txnInvocation,
Expand Down Expand Up @@ -265,7 +265,7 @@ describe('Test function: upgradeAccContract', function () {
const txn = {
txnHash: sendTransactionResp.transaction_hash,
txnType: VoyagerTransactionType.INVOKE,
chainId: STARKNET_TESTNET_NETWORK.chainId,
chainId: STARKNET_SEPOLIA_TESTNET_NETWORK.chainId,
senderAddress: address,
contractAddress: address,
contractFuncName: 'upgrade',
Expand Down

0 comments on commit 213b2e2

Please sign in to comment.