Skip to content

Commit

Permalink
refactor: market module (#4992)
Browse files Browse the repository at this point in the history
* chore: remove market code

* chore: removed unused exports and renamed type file

Co-authored-by: Tuditi <45079109+Tuditi@users.noreply.github.com>
Co-authored-by: Tuditi <daviddetroch@pm.me>
  • Loading branch information
3 people committed Oct 20, 2022
1 parent abce41c commit 522012a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 285 deletions.
4 changes: 2 additions & 2 deletions packages/shared/lib/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { writable, Writable } from 'svelte/store'
import { DateDiff } from './typings/wallet'
import { DateDifference } from './typings/dateDifference'

/**
* Update application path
Expand Down Expand Up @@ -127,7 +127,7 @@ export const truncateString = (
* @param firstDate: first date to compare
* @param secondDate: second sate to compare
*/
export const diffDates = (firstDate: Date, secondDate: Date): DateDiff => {
export const diffDates = (firstDate: Date, secondDate: Date): DateDifference => {
if (!(firstDate instanceof Date) || !(secondDate instanceof Date)) {
return null
}
Expand Down
184 changes: 0 additions & 184 deletions packages/shared/lib/market.ts

This file was deleted.

4 changes: 4 additions & 0 deletions packages/shared/lib/typings/dateDifference.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface DateDifference {
unit: string
value?: number
}
2 changes: 1 addition & 1 deletion packages/shared/lib/typings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import * as currency from './currency'
import * as events from './events'
import * as message from './message'
import * as utils from './utils'
import * as wallet from './wallet'
import * as wallet from './dateDifference'

export { currency, events, message, utils, wallet }
78 changes: 0 additions & 78 deletions packages/shared/lib/typings/market.ts

This file was deleted.

18 changes: 0 additions & 18 deletions packages/shared/lib/typings/wallet.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { Dropdown, Text } from 'shared/components'
import { exchangeRates } from 'shared/lib/currency'
import { localize } from '@core/i18n'
import { addProfileCurrencyPriceData } from 'shared/lib/market'
import { activeProfile, updateActiveProfileSettings } from '@core/profile'
import type { DropdownChoice } from '@core/utils'
Expand All @@ -13,7 +12,6 @@
function handleCurrencySelect(item): void {
updateActiveProfileSettings({ currency: item.value })
void addProfileCurrencyPriceData()
}
</script>

Expand Down

0 comments on commit 522012a

Please sign in to comment.