Skip to content

Commit

Permalink
Merge pull request #1 from protofire/rootstock
Browse files Browse the repository at this point in the history
Rootstock
  • Loading branch information
gofman8 authored Jan 11, 2024
2 parents 227ba0d + 718e7d8 commit 9d63af6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@
"lodash": "^4.17.21",
"next": "^13.2.0",
"papaparse": "^5.3.2",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"qrcode.react": "^3.1.0",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand Down Expand Up @@ -128,6 +126,7 @@
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"pre-commit": "^1.2.2",
"prettier": "^2.7.0",
"ts-node": "^10.8.2",
Expand Down
13 changes: 13 additions & 0 deletions patches/@safe-global+safe-modules-deployments+1.1.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@safe-global/safe-modules-deployments/dist/assets/allowance-module/v0.1.0/allowance-module.json b/node_modules/@safe-global/safe-modules-deployments/dist/assets/allowance-module/v0.1.0/allowance-module.json
index be46b64..3fca69c 100644
--- a/node_modules/@safe-global/safe-modules-deployments/dist/assets/allowance-module/v0.1.0/allowance-module.json
+++ b/node_modules/@safe-global/safe-modules-deployments/dist/assets/allowance-module/v0.1.0/allowance-module.json
@@ -6,6 +6,8 @@
"1": "0xCFbFaC74C26F8647cBDb8c5caf80BB5b32E43134",
"4": "0xCFbFaC74C26F8647cBDb8c5caf80BB5b32E43134",
"5": "0xCFbFaC74C26F8647cBDb8c5caf80BB5b32E43134",
+ "30": "0xE46FE78DBfCa5E835667Ba9dCd3F3315E7623F8a",
+ "31": "0xE46FE78DBfCa5E835667Ba9dCd3F3315E7623F8a",
"42": "0xCFbFaC74C26F8647cBDb8c5caf80BB5b32E43134",
"56": "0xCFbFaC74C26F8647cBDb8c5caf80BB5b32E43134",
"100": "0xCFbFaC74C26F8647cBDb8c5caf80BB5b32E43134",
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { WrongChainWarning } from '@/components/tx/WrongChainWarning'
import { asError } from '@/services/exceptions/utils'
import TxCard from '@/components/tx-flow/common/TxCard'
import { TxModalContext } from '@/components/tx-flow'
import { checksumAddress } from '@/utils/addresses'

export type SpendingLimitTxParams = {
safeAddress: string
Expand Down Expand Up @@ -56,7 +57,7 @@ const ReviewSpendingLimitTx = ({
() => ({
safeAddress,
token: spendingLimit?.token.address || ZERO_ADDRESS,
to: params.recipient,
to: checksumAddress(params.recipient),
amount: parseUnits(params.amount, token?.tokenInfo.decimals).toString(),
paymentToken: ZERO_ADDRESS,
payment: 0,
Expand Down
2 changes: 2 additions & 0 deletions src/services/tx/tx-sender/spendingLimit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { createAddDelegateTx, createResetAllowanceTx, createSetAllowanceTx } fro
import { parseUnits } from '@ethersproject/units'
import { currentMinutes } from '@/utils/date'
import { createMultiSendCallOnlyTx } from '@/services/tx/tx-sender/create'
import { checksumAddress } from '@/utils/addresses'

export type NewSpendingLimitData = {
beneficiary: string
Expand All @@ -26,6 +27,7 @@ export const createNewSpendingLimitTx = async (
if (!spendingLimitAddress || !sdk) return

const txs: MetaTransactionData[] = []
data.beneficiary = checksumAddress(data.beneficiary)

const isSpendingLimitEnabled = await sdk.isModuleEnabled(spendingLimitAddress)
if (!isSpendingLimitEnabled) {
Expand Down

0 comments on commit 9d63af6

Please sign in to comment.