Open arnarhf opened 3 months ago
Hey @arnarhf ,
What error do you see exactly?
Hi @Shiroy ,
Apologies, I should have included that.
This is what I get when using an address like "deposit:1234" but not when using an address like "deposit_1234". Note, I'm playing with the kittie tutorial, adapting it to Formance Ledger v2.
c:\dev\Formance\kittie-app-tutorial\node_modules\@formance\formance-sdk\src\sdk\models\errors\v2errorresponse.ts:56
return new V2ErrorResponse(v);
^
V2ErrorResponse: API error occurred
at Object.transform (c:\dev\Formance\kittie-app-tutorial\node_modules\@formance\formance-sdk\src\sdk\models\errors\v2errorresponse.ts:56:20)
at ZodEffects._parse (c:\dev\Formance\kittie-app-tutorial\node_modules\zod\lib\types.js:3224:39)
at ZodEffects._parseSync (c:\dev\Formance\kittie-app-tutorial\node_modules\zod\lib\types.js:146:29)
at ZodEffects.safeParse (c:\dev\Formance\kittie-app-tutorial\node_modules\zod\lib\types.js:176:29)
at ZodEffects.parse (c:\dev\Formance\kittie-app-tutorial\node_modules\zod\lib\types.js:157:29)
at c:\dev\Formance\kittie-app-tutorial\node_modules\@formance\formance-sdk\src\lib\http.ts:474:57
at parse (c:\dev\Formance\kittie-app-tutorial\node_modules\@formance\formance-sdk\src\lib\schemas.ts:15:16)
at ResponseMatcher.match (c:\dev\Formance\kittie-app-tutorial\node_modules\@formance\formance-sdk\src\lib\http.ts:474:27)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Ledger.v2AddMetadataToAccount (c:\dev\Formance\kittie-app-tutorial\node_modules\@formance\formance-sdk\src\sdk\ledger.ts:1821:27) {
'data$': {
errorCode: 'VALIDATION',
errorMessage: 'invalid account address format'
},
errorCode: 'VALIDATION',
errorMessage: 'invalid account address format'
}
Using
v2CreateTransaction
you can create a transaction for an address which includes a colon ("user:1234"), e.g.But you then cannot call
v2AddMetadataToAccount
for the same address:Using addresses with an underscore works fine ("user_1234"), but it's surprising that a colon doesn't given that it's used in many of your examples.
Using Node, Typescript and "@formance/formance-sdk": "^2.4.4".