File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,14 @@ async function resolveAccount(accessToken: string): Promise<DocuSignAccountInfo>
3838 throw new Error ( 'No DocuSign accounts found for this user' )
3939 }
4040
41+ const baseUri = defaultAccount . base_uri
42+ if ( ! baseUri ) {
43+ throw new Error ( 'DocuSign account is missing base_uri' )
44+ }
45+
4146 return {
4247 accountId : defaultAccount . account_id ,
43- baseUri : defaultAccount . base_uri ,
48+ baseUri,
4449 }
4550}
4651
Original file line number Diff line number Diff line change @@ -270,15 +270,7 @@ export const DocuSignBlock: BlockConfig<DocuSignResponse> = {
270270 'docusign_list_recipients' ,
271271 ] ,
272272 config : {
273- tool : ( params ) => {
274- const file = normalizeFileInput ( params . uploadDocument || params . documentRef , {
275- single : true ,
276- } )
277- if ( file ) {
278- params . file = file
279- }
280- return `docusign_${ params . operation } `
281- } ,
273+ tool : ( params ) => `docusign_${ params . operation } ` ,
282274 params : ( params ) => {
283275 const {
284276 oauthCredential,
@@ -293,6 +285,13 @@ export const DocuSignBlock: BlockConfig<DocuSignResponse> = {
293285 oauthCredential,
294286 }
295287
288+ const file = normalizeFileInput ( params . uploadDocument || params . documentRef , {
289+ single : true ,
290+ } )
291+ if ( file ) {
292+ cleanParams . file = file
293+ }
294+
296295 if ( listEnvelopeStatus && operation === 'list_envelopes' ) {
297296 cleanParams . envelopeStatus = listEnvelopeStatus
298297 }
You can’t perform that action at this time.
0 commit comments