Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Allow snake_case deposit params (#75)
Browse files Browse the repository at this point in the history
* allow snake-case deposit request params

* bump version
  • Loading branch information
Morley Zhi authored Jul 3, 2019
1 parent af192fa commit 31653f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stellar/wallet-sdk",
"version": "0.0.3-rc8",
"version": "0.0.3-rc9",
"description": "Libraries to help you write Stellar-enabled wallets in Javascript",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/transfers/DepositProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ import { TransferProvider } from "./TransferProvider";
export class DepositProvider extends TransferProvider {
public async deposit(args: DepositRequest): Promise<TransferResponse> {
const search = queryString.stringify({
asset_code: args.assetCode,
asset_code: args.assetCode || args.asset_code,
account: args.account,
memo: args.memo,
email_address: args.emailAddress,
email_address: args.emailAddress || args.email_address,
type: args.type,
});
const response = await fetch(`${this.transferServer}/deposit?${search}`);
Expand Down
4 changes: 3 additions & 1 deletion src/types/transfers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,12 @@ export interface WithdrawRequest {
}

export interface DepositRequest {
assetCode: string;
assetCode?: string;
asset_code?: string;
account: string;
memo?: Memo;
emailAddress?: string;
email_address?: string;
type?: string;
}

Expand Down

0 comments on commit 31653f0

Please sign in to comment.