@@ -266,7 +266,7 @@ export type IdlTypeGeneric = {
266266export type IdlDiscriminator = number [ ] ;
267267
268268export function isCompositeAccounts (
269- accountItem : IdlInstructionAccountItem
269+ accountItem : IdlInstructionAccountItem ,
270270) : accountItem is IdlInstructionAccounts {
271271 return "accounts" in accountItem ;
272272}
@@ -321,7 +321,11 @@ export function convertIdlToCamelCase<I extends Idl>(idl: I) {
321321
322322 // `my_account.field` is getting converted to `myAccountField` but we
323323 // need `myAccount.field`.
324- const toCamelCase = ( s : any ) => s . split ( "." ) . map ( camelCase ) . join ( "." ) ;
324+ const toCamelCase = ( s : any ) =>
325+ s
326+ . split ( "." )
327+ . map ( ( part : any ) => camelCase ( part , { locale : false } ) )
328+ . join ( "." ) ;
325329
326330 const recursivelyConvertNamesToCamelCase = ( obj : Record < string , any > ) => {
327331 for ( const key in obj ) {
@@ -344,7 +348,7 @@ export function handleDefinedFields<U, N, T>(
344348 fields : IdlDefinedFields | undefined ,
345349 unitCb : ( ) => U ,
346350 namedCb : ( fields : IdlDefinedFieldsNamed ) => N ,
347- tupleCb : ( fields : IdlDefinedFieldsTuple ) => T
351+ tupleCb : ( fields : IdlDefinedFieldsTuple ) => T ,
348352) {
349353 // Unit
350354 if ( ! fields ?. length ) return unitCb ( ) ;
0 commit comments