@b3dotfun/sdk 0.0.71-alpha.1 → 0.0.71-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -81,7 +81,8 @@ exports.useCurrencyStore = (0, zustand_1.create)()((0, middleware_1.persist)((se
81
81
  removeCurrency: code => {
82
82
  set(state => {
83
83
  // Remove the currency
84
- const { [code]: _removed, ...remaining } = state.customCurrencies;
84
+ const customCurrencies = state.customCurrencies;
85
+ const remaining = Object.fromEntries(Object.entries(customCurrencies).filter(([key]) => key !== code));
85
86
  // Remove all exchange rates involving this currency
86
87
  const filteredRates = {};
87
88
  for (const [key, rate] of Object.entries(state.customExchangeRates)) {
@@ -74,7 +74,8 @@ export const useCurrencyStore = create()(persist((set, get) => ({
74
74
  removeCurrency: code => {
75
75
  set(state => {
76
76
  // Remove the currency
77
- const { [code]: _removed, ...remaining } = state.customCurrencies;
77
+ const customCurrencies = state.customCurrencies;
78
+ const remaining = Object.fromEntries(Object.entries(customCurrencies).filter(([key]) => key !== code));
78
79
  // Remove all exchange rates involving this currency
79
80
  const filteredRates = {};
80
81
  for (const [key, rate] of Object.entries(state.customExchangeRates)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b3dotfun/sdk",
3
- "version": "0.0.71-alpha.1",
3
+ "version": "0.0.71-alpha.2",
4
4
  "source": "src/index.ts",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "react-native": "./dist/cjs/index.native.js",
@@ -147,7 +147,9 @@ export const useCurrencyStore = create<CurrencyState>()(
147
147
  removeCurrency: code => {
148
148
  set(state => {
149
149
  // Remove the currency
150
- const { [code]: _removed, ...remaining } = state.customCurrencies;
150
+ const customCurrencies = state.customCurrencies;
151
+
152
+ const remaining = Object.fromEntries(Object.entries(customCurrencies).filter(([key]) => key !== code));
151
153
 
152
154
  // Remove all exchange rates involving this currency
153
155
  const filteredRates: Record<string, number> = {};