Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
guplersaxanoid committed Aug 28, 2023
1 parent 53c959f commit 051338b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
12 changes: 0 additions & 12 deletions packages/node/src/stellar/api.stellar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,21 +206,9 @@ export class StellarApi implements ApiWrapper<StellarBlockWrapper> {

return Promise.all(
transactions.map(async (tx, index) => {
let account: ServerApi.AccountRecord;
try {
account = await tx.account();
} catch (e) {
if ((e as Error).name === 'NotFoundError') {
account = null;
} else {
throw e;
}
}

const wrappedTx: StellarTransaction = {
...tx,
ledger: null,
account: account,
operations: [] as StellarOperation[],
effects: [] as StellarEffect[],
events: [] as SorobanEvent[],
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/yargs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export const yargsOptions = yargs(hideBin(process.argv))
describe: 'Specify the dictionary api for this network',
type: 'string',
},
'stellar-network-endpoint': {
'network-endpoint': {
demandOption: false,
type: 'string',
describe: 'Blockchain network endpoint to connect',
Expand Down
3 changes: 1 addition & 2 deletions packages/types/src/stellar/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ export type StellarBlock = Omit<ServerApi.LedgerRecord, 'effects' | 'operations'

export type StellarTransaction = Omit<
ServerApi.TransactionRecord,
'account' | 'effects' | 'ledger' | 'operations' | 'precedes' | 'self' | 'succeeds'
'effects' | 'ledger' | 'operations' | 'precedes' | 'self' | 'succeeds'
> & {
account: ServerApi.AccountRecord;
effects: StellarEffect[];
ledger: StellarBlock;
operations: StellarOperation[];
Expand Down

0 comments on commit 051338b

Please sign in to comment.