Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding wallets filter in fetch transfers API #49

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/transfersApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ function getTransferById(transferId: string) {
* @param {String} pageSize
*/
function getTransfers(
walletId: string,
sourceWalletId: string,
destinationWalletId: string,
from: string,
Expand All @@ -94,6 +95,7 @@ function getTransfers(
pageSize: string
) {
const queryParams = {
walletId: nullIfEmpty(walletId),
sourceWalletId: nullIfEmpty(sourceWalletId),
destinationWalletId: nullIfEmpty(destinationWalletId),
from: nullIfEmpty(from),
Expand Down
3 changes: 3 additions & 0 deletions pages/debug/wallets/transfers/fetch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<v-col cols="12" md="4">
<v-form>
<header>Optional filter params:</header>
<v-text-field v-model="formData.walletId" label="Wallet ID" />
<v-text-field
v-model="formData.sourceWalletId"
label="Source Wallet ID"
Expand Down Expand Up @@ -65,6 +66,7 @@ import ErrorSheet from '@/components/ErrorSheet.vue'
export default class FetchTransfersClass extends Vue {
// data
formData = {
walletId: '',
sourceWalletId: '',
destinationWalletId: '',
from: '',
Expand Down Expand Up @@ -92,6 +94,7 @@ export default class FetchTransfersClass extends Vue {
this.loading = true
try {
await this.$transfersApi.getTransfers(
this.formData.walletId,
this.formData.sourceWalletId,
this.formData.destinationWalletId,
this.formData.from,
Expand Down