edge-core-js 2.2.1 → 2.4.0

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.
@@ -163,9 +163,12 @@ export interface EdgeNativeIo {
163
163
  * All core plugins receive these options at creation time.
164
164
  */
165
165
  export interface EdgeCorePluginOptions {
166
- // Load-time options (like API keys) passed into the context:
166
+ /** Load-time options (like API keys) passed into the context */
167
167
  initOptions: JsonObject
168
168
 
169
+ /** Data provided by the info server */
170
+ infoPayload: JsonObject
171
+
169
172
  // Access to the world outside the plugin:
170
173
  io: EdgeIo
171
174
  log: EdgeLog // Plugin-scoped logging
@@ -543,6 +546,9 @@ export type EdgeConfirmationState =
543
546
  | 'confirmed'
544
547
  // Dropped from the network without confirmations:
545
548
  | 'dropped'
549
+ // Confirmed, but failed on-chain execution (exceeded gas limit,
550
+ // smart-contract failure, etc):
551
+ | 'failed'
546
552
  // We don't know the chain height yet:
547
553
  | 'syncing'
548
554
  // No confirmations yet:
@@ -1034,6 +1040,7 @@ export interface EdgeCurrencyPlugin {
1034
1040
  walletInfo: EdgeWalletInfo,
1035
1041
  opts: EdgeCurrencyEngineOptions
1036
1042
  ) => Promise<EdgeCurrencyEngine>
1043
+ readonly updateInfoPayload?: (infoPayload: JsonObject) => Promise<void>
1037
1044
 
1038
1045
  // Escape hatch:
1039
1046
  readonly otherMethods?: EdgeOtherMethods
@@ -1311,7 +1318,7 @@ export interface EdgeSwapPlugin {
1311
1318
  readonly fetchSwapQuote: (
1312
1319
  request: EdgeSwapRequest,
1313
1320
  userSettings: JsonObject | undefined,
1314
- opts: { promoCode?: string }
1321
+ opts: { infoPayload: JsonObject; promoCode?: string }
1315
1322
  ) => Promise<EdgeSwapQuote>
1316
1323
  }
1317
1324
 
@@ -1,31 +0,0 @@
1
- import { buildReducer } from 'redux-keto'
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
- const defaultEdgeServers = {
15
- infoServers: [],
16
- syncServers: []
17
- }
18
-
19
- export const contextConfig = buildReducer
20
-
21
-
22
-
23
- ({
24
- edgeServers(state = defaultEdgeServers, action) {
25
- if (action.type === 'INIT') {
26
- const { infoServers, syncServers } = action.payload
27
- return { infoServers, syncServers }
28
- }
29
- return state
30
- }
31
- })