File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/grant-explorer/src Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ export const useCheckoutStore = create<CheckoutState>()(
180
180
client : walletClient ,
181
181
} ) ;
182
182
nonce = await erc20Contract . read . nonces ( [ owner ] ) ;
183
- const tokenName = await erc20Contract . read . name ( ) ;
183
+ let tokenName = await erc20Contract . read . name ( ) ;
184
184
if ( getPermitType ( token , chainId ) === "dai" ) {
185
185
sig = await signPermitDai ( {
186
186
walletClient : walletClient ,
@@ -194,6 +194,13 @@ export const useCheckoutStore = create<CheckoutState>()(
194
194
permitVersion : token . permitVersion ?? "1" ,
195
195
} ) ;
196
196
} else {
197
+ // cUSD is a special case where the token symbol is used for permit instead of the name
198
+ if (
199
+ chainId === 42220 &&
200
+ token . address . toLowerCase ( ) ===
201
+ "0x765de816845861e75a25fca122bb6898b8b1282a" . toLowerCase ( )
202
+ )
203
+ tokenName = "cUSD" ;
197
204
sig = await signPermit2612 ( {
198
205
walletClient : walletClient ,
199
206
value : totalDonationPerChain [ chainId ] ,
You can’t perform that action at this time.
0 commit comments