Skip to content

Commit

Permalink
Update for bumped versions
Browse files Browse the repository at this point in the history
  • Loading branch information
bigboydiamonds committed Jun 5, 2024
1 parent 5199f69 commit 0f519de
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 432 deletions.
3 changes: 2 additions & 1 deletion packages/synapse-interface/actions/approveErc20Token.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
type SimulateContractParameters,
simulateContract,
waitForTransactionReceipt,
writeContract,
Expand Down Expand Up @@ -36,7 +37,7 @@ export const approveErc20Token = async ({
abi,
functionName: 'approve',
args: [spender, amount ?? MAX_UINT256],
})
} as SimulateContractParameters)

const hash = await writeContract(wagmiConfig, request)

Expand Down
3 changes: 2 additions & 1 deletion packages/synapse-interface/actions/harvestLpPool.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
type SimulateContractParameters,
simulateContract,
waitForTransactionReceipt,
writeContract,
Expand All @@ -25,7 +26,7 @@ export const harvestLpPool = async ({
abi: MINICHEF_ABI,
functionName: 'harvest',
args: [poolId, address],
})
} as SimulateContractParameters)

const hash = await writeContract(wagmiConfig, request)
const txReceipt = await waitForTransactionReceipt(wagmiConfig, { hash })
Expand Down
3 changes: 2 additions & 1 deletion packages/synapse-interface/actions/stakeLpToken.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
type SimulateContractParameters,
simulateContract,
waitForTransactionReceipt,
writeContract,
Expand Down Expand Up @@ -27,7 +28,7 @@ export const stakeLpToken = async ({
abi: MINICHEF_ABI,
functionName: 'deposit',
args: [poolId, amount, address],
})
} as SimulateContractParameters)

const hash = await writeContract(wagmiConfig, request)
const txReceipt = await waitForTransactionReceipt(wagmiConfig, { hash })
Expand Down
6 changes: 5 additions & 1 deletion packages/synapse-interface/actions/swapPoolAddLiquidity.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
type SimulateContractParameters,
simulateContract,
waitForTransactionReceipt,
writeContract,
Expand Down Expand Up @@ -42,7 +43,10 @@ export const swapPoolAddLiquidity = async ({
pwcConfig = pwcBaseConfig
}

const { request } = await simulateContract(wagmiConfig, pwcConfig)
const { request } = await simulateContract(
wagmiConfig,
pwcConfig as SimulateContractParameters
)

const hash = await writeContract(wagmiConfig, request)
const txReceipt = await waitForTransactionReceipt(wagmiConfig, { hash })
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ALL } from '@constants/withdrawTypes'
import {
type SimulateContractParameters,
simulateContract,
waitForTransactionReceipt,
writeContract,
Expand Down Expand Up @@ -42,7 +43,7 @@ export const swapPoolRemoveLiquidity = async ({
),
Math.round(new Date().getTime() / 1000 + 60 * 10),
],
})
} as SimulateContractParameters)

const hash = await writeContract(wagmiConfig, request)
const txReceipt = await waitForTransactionReceipt(wagmiConfig, { hash })
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
type SimulateContractParameters,
simulateContract,
waitForTransactionReceipt,
writeContract,
Expand Down Expand Up @@ -43,7 +44,7 @@ export const swapPoolRemoveLiquidityOneToken = async ({
),
Math.round(new Date().getTime() / 1000 + 60 * 10),
],
})
} as SimulateContractParameters)

const hash = await writeContract(wagmiConfig, request)
const txReceipt = await waitForTransactionReceipt(wagmiConfig, {
Expand Down
3 changes: 2 additions & 1 deletion packages/synapse-interface/actions/unstakeLpToken.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
type SimulateContractParameters,
simulateContract,
waitForTransactionReceipt,
writeContract,
Expand Down Expand Up @@ -27,7 +28,7 @@ export const unstakeLpToken = async ({
abi: MINICHEF_ABI,
functionName: 'withdraw',
args: [poolId, amount, address],
})
} as SimulateContractParameters)

const hash = await writeContract(wagmiConfig, request)
const txReceipt = await waitForTransactionReceipt(wagmiConfig, { hash })
Expand Down
4 changes: 2 additions & 2 deletions packages/synapse-interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"@types/web3": "^1.2.2",
"@visx/chord": "^3.0.0",
"@visx/shape": "^3.0.0",
"@wagmi/connectors": "^4.1.24",
"@wagmi/core": "^2.6.15",
"@wagmi/connectors": "^5.0.0",
"@wagmi/core": "^2.10.5",
"babel-plugin-transform-bigint": "^1.0.32",
"eslint": "^8.37.0",
"eslint-config-next": "^13.5.6",
Expand Down
Loading

0 comments on commit 0f519de

Please sign in to comment.