|
1 | 1 | import type { Address, Hex, Client } from 'viem'; |
2 | 2 |
|
3 | | -import { getDelegationHashOffchain } from '../delegation'; |
| 3 | +import { hashDelegation } from '../delegation'; |
4 | 4 | import * as ERC20PeriodTransferEnforcer from '../DelegationFramework/ERC20PeriodTransferEnforcer'; |
5 | 5 | import * as ERC20StreamingEnforcer from '../DelegationFramework/ERC20StreamingEnforcer'; |
6 | 6 | import * as MultiTokenPeriodEnforcer from '../DelegationFramework/MultiTokenPeriodEnforcer'; |
@@ -133,7 +133,7 @@ export async function getErc20PeriodTransferEnforcerAvailableAmount( |
133 | 133 | environment, |
134 | 134 | }); |
135 | 135 |
|
136 | | - const delegationHash = getDelegationHashOffchain(params.delegation); |
| 136 | + const delegationHash = hashDelegation(params.delegation); |
137 | 137 | const { terms } = findMatchingCaveat({ |
138 | 138 | delegation: params.delegation, |
139 | 139 | enforcerAddress, |
@@ -169,7 +169,7 @@ export async function getErc20StreamingEnforcerAvailableAmount( |
169 | 169 | environment, |
170 | 170 | }); |
171 | 171 |
|
172 | | - const delegationHash = getDelegationHashOffchain(params.delegation); |
| 172 | + const delegationHash = hashDelegation(params.delegation); |
173 | 173 | const { terms } = findMatchingCaveat({ |
174 | 174 | delegation: params.delegation, |
175 | 175 | enforcerAddress, |
@@ -205,7 +205,7 @@ export async function getMultiTokenPeriodEnforcerAvailableAmount( |
205 | 205 | environment, |
206 | 206 | }); |
207 | 207 |
|
208 | | - const delegationHash = getDelegationHashOffchain(params.delegation); |
| 208 | + const delegationHash = hashDelegation(params.delegation); |
209 | 209 | const { terms, args } = findMatchingCaveat({ |
210 | 210 | delegation: params.delegation, |
211 | 211 | enforcerAddress, |
@@ -242,7 +242,7 @@ export async function getNativeTokenPeriodTransferEnforcerAvailableAmount( |
242 | 242 | environment, |
243 | 243 | }); |
244 | 244 |
|
245 | | - const delegationHash = getDelegationHashOffchain(params.delegation); |
| 245 | + const delegationHash = hashDelegation(params.delegation); |
246 | 246 | const { terms } = findMatchingCaveat({ |
247 | 247 | delegation: params.delegation, |
248 | 248 | enforcerAddress, |
@@ -278,7 +278,7 @@ export async function getNativeTokenStreamingEnforcerAvailableAmount( |
278 | 278 | environment, |
279 | 279 | }); |
280 | 280 |
|
281 | | - const delegationHash = getDelegationHashOffchain(params.delegation); |
| 281 | + const delegationHash = hashDelegation(params.delegation); |
282 | 282 | const { terms } = findMatchingCaveat({ |
283 | 283 | delegation: params.delegation, |
284 | 284 | enforcerAddress, |
|
0 commit comments