-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FAT-100: Adaptations on the Manager for FTS (#1279)
- Loading branch information
1 parent
7593158
commit 0f1bf87
Showing
31 changed files
with
952 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@ledgerhq/live-common": minor | ||
--- | ||
|
||
Addad feature flag and type definitions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"live-mobile": minor | ||
--- | ||
|
||
Adaptations to My Ledger screen and Device Selection screen rebuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@ledgerhq/live-cli": patch | ||
--- | ||
|
||
Fixed compilation issue by adding type definitions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,71 @@ | ||
import { map, tap, scan as rxScan } from "rxjs/operators"; | ||
import { discoverDevices } from "@ledgerhq/live-common/hw/index"; | ||
export default { | ||
args: [ | ||
{ | ||
name: "module", | ||
alias: "m", | ||
type: String, | ||
desc: "filter a specific module (either hid | ble)", | ||
}, | ||
{ | ||
name: "interactive", | ||
alias: "i", | ||
type: Boolean, | ||
desc: | ||
"interactive mode that accumulate the events instead of showing them", | ||
}, | ||
], | ||
job: ({ | ||
module, | ||
interactive, | ||
}: Partial<{ | ||
module: string; | ||
interactive: boolean; | ||
}>) => { | ||
const events = discoverDevices((m) => | ||
!module ? true : module.split(",").includes(m.id) | ||
); | ||
if (!interactive) return events; | ||
return events | ||
.pipe( | ||
rxScan((acc: any[], value) => { | ||
let copy; | ||
|
||
if (value.type === "remove") { | ||
copy = acc.filter((a) => a.id === value.id); | ||
} else { | ||
const existing = acc.find((o) => o.id === value.id); | ||
|
||
if (existing) { | ||
const i = acc.indexOf(existing); | ||
copy = [...acc]; | ||
|
||
if (value.name) { | ||
copy[i] = value; | ||
} | ||
} else { | ||
copy = acc.concat({ | ||
id: value.id, | ||
name: value.name, | ||
}); | ||
} | ||
} | ||
|
||
return copy; | ||
}, []) | ||
) | ||
.pipe( | ||
tap(() => { | ||
// eslint-disable-next-line no-console | ||
console.clear(); | ||
}), | ||
map((acc) => | ||
acc | ||
.map((o) => `${(o.name || "(no name)").padEnd(40)} ${o.id}`) | ||
.join("\n") | ||
) | ||
); | ||
}, | ||
}; | ||
import { map, tap, scan as rxScan } from "rxjs/operators"; | ||
import { discoverDevices } from "@ledgerhq/live-common/hw/index"; | ||
import type { DeviceEvent } from "@ledgerhq/live-common/hw/index"; | ||
|
||
export default { | ||
args: [ | ||
{ | ||
name: "module", | ||
alias: "m", | ||
type: String, | ||
desc: "filter a specific module (either hid | ble)", | ||
}, | ||
{ | ||
name: "interactive", | ||
alias: "i", | ||
type: Boolean, | ||
desc: | ||
"interactive mode that accumulate the events instead of showing them", | ||
}, | ||
], | ||
job: ({ | ||
module, | ||
interactive, | ||
}: Partial<{ | ||
module: string; | ||
interactive: boolean; | ||
}>) => { | ||
const events = discoverDevices((m) => | ||
!module ? true : module.split(",").includes(m.id) | ||
); | ||
if (!interactive) return events; | ||
return events | ||
.pipe( | ||
rxScan((acc: DeviceEvent[], value) => { | ||
let copy; | ||
|
||
if (value.type === "remove") { | ||
copy = acc.filter((a) => a.id === value.id); | ||
} else { | ||
const existing = acc.find((o) => o.id === value.id); | ||
|
||
if (existing) { | ||
const i = acc.indexOf(existing); | ||
copy = [...acc]; | ||
|
||
if (value.name) { | ||
copy[i] = value; | ||
} | ||
} else { | ||
copy = acc.concat({ | ||
...value | ||
}); | ||
} | ||
} | ||
|
||
return copy; | ||
}, []) | ||
) | ||
.pipe( | ||
tap(() => { | ||
// eslint-disable-next-line no-console | ||
console.clear(); | ||
}), | ||
map((acc) => | ||
acc | ||
.map((o) => `${(o.name || "(no name)").padEnd(40)} ${o.id}`) | ||
.join("\n") | ||
) | ||
); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
0f1bf87
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⏲ 24min 48s ✅ 89 txs ❌ 8 txs ($371.58) for [Bot] non-reg on develop with 'Phosphore'
❌ 8 mutation errors
Portfolio ($371.58) – Details of the 42 currencies
Performance ⏲ 24min 48s
Time spent for each spec: (total across mutations)