Skip to content

feat: add vendorfield to list of exportable options#1

Merged
dated merged 5 commits intodated:masterfrom
arkmoon:master
Nov 20, 2021
Merged

feat: add vendorfield to list of exportable options#1
dated merged 5 commits intodated:masterfrom
arkmoon:master

Conversation

@arkmoon
Copy link
Contributor

@arkmoon arkmoon commented Nov 4, 2021

Made this change for myself, thought I could contribute if this is something anyone else needed.

Helps distinguish transactions that are listed, and allows you to sort by Smartbridge in case you have specific groupings you need to organize your transactions into.

Let me know if I need to make any additional changes @dated

date: true,
crypto: true,
fiat: true,
vendorField: true,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the stored options need to be merged with the default options, otherwise the vendorField toggle won't be visible, something like:

    exportOptions () {
      const defaultOptions = {
        delimiter: ',',
        includeHeaders: true,
        columns: {
          date: true,
          crypto: true,
          fiat: true,
          vendorField: true,
          id: true
        }
      }

      const storedOptions = walletApi.storage.get('exportOptions', true)

      if (!storedOptions) {
        return defaultOptions
      }

      const columns = {
        ...defaultOptions.columns,
        ...storedOptions.columns
      }

      return {
        ...defaultOptions,
        ...storedOptions,
        columns
      }
    },

@dated dated changed the title [Feature] - Add Smartbridge (vendorField) to list of exportable options feat: add vendorfield to list of exportable options Nov 19, 2021
arkmoon and others added 2 commits November 19, 2021 17:51
Co-authored-by: Edgar Goetzendorff <hello@dated.fun>
Co-authored-by: Edgar Goetzendorff <hello@dated.fun>
@dated dated merged commit 090e3f7 into dated:master Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants