Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwellmattryan committed Sep 6, 2023
1 parent 0426dc2 commit 28f7452
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions packages/shared/src/lib/core/layer-2/actions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ export * from './canAccountMakeEvmTransaction'
export * from './estimateGasForLayer1ToLayer2Transaction'
export * from './fetchSelectedAccountLayer2Balance'
export * from './generateAndStoreEvmAddressForAccount'
export * from './getGasPriceFromProvider'
export * from './getNetworkIdFromAddress'
export * from './getGasFeesForLayer1ToLayer2Transaction'
export * from './getGasPriceForNetwork'
export * from './getIscpTransferSmartContractData'
export * from './getLayer2MetadataForTransfer'
export * from './getLayer2NetworkFromAddress'
export * from './getNetworkIdFromAddress'
export * from './pollEvmChainGasPrices'
export * from './pollLayer2Tokens'
export * from './signEvmTransactionWithStronghold'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { handleError } from '@core/error/handlers'
import { NetworkId } from '@core/network/types'
import { setEvmChainGasPrice } from '../stores'
import { getGasPriceForNetwork } from './getGasPriceFromProvider'
import { getGasPriceForNetwork } from './getGasPriceForNetwork'

export async function updateEvmChainGasPrice(chainId: NetworkId): Promise<void> {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ jest.mock('../../network/actions/getChainConfiguration', () => ({
getChainConfiguration: jest.fn((_) => destinationNetwork),
}))

jest.mock('../../layer-2/actions/getGasPriceInWei', () => ({
getGasPriceInWei: jest.fn((_) => 1_000_000_000_000n),
jest.mock('../../layer-2/actions/getGasPriceForNetwork', () => ({
getGasPriceForNetwork: jest.fn((_) => 1_000_000_000_000n),
}))

jest.mock('../../layer-2/actions/estimateGasForLayer1ToLayer2Transaction', () => ({
Expand Down Expand Up @@ -234,7 +234,7 @@ describe('File: getOutputParameters.ts', () => {
const output = await getOutputParameters(sendFlowParameters, senderAddress)
const expectedOutput = {
recipientAddress: destinationNetwork.aliasAddress,
amount: '1000026620',
amount: '1000000000',
features: {
metadata:
'0x00000000025e4b3ca1e3f423fccf01010161200300010000070c000c30680e00000090000f0ea000060009000d300000000000808094ebdc03',
Expand Down Expand Up @@ -266,7 +266,7 @@ describe('File: getOutputParameters.ts', () => {

const expectedOutput = {
recipientAddress: destinationNetwork.aliasAddress,
amount: '26785',
amount: '0',
assets: {
nativeTokens: [
{
Expand Down Expand Up @@ -297,7 +297,7 @@ describe('File: getOutputParameters.ts', () => {

const expectedOutput = {
recipientAddress: destinationNetwork.aliasAddress,
amount: '27170',
amount: '0',
assets: {
nftId,
},
Expand Down

0 comments on commit 28f7452

Please sign in to comment.