File tree Expand file tree Collapse file tree 6 files changed +33
-25
lines changed Expand file tree Collapse file tree 6 files changed +33
-25
lines changed Original file line number Diff line number Diff line change 1
1
.stack-work
2
+ src /Proto
Original file line number Diff line number Diff line change @@ -444,6 +444,7 @@ test-suite lnd-client-test
444
444
async
445
445
, base >= 4.7 && < 5
446
446
, containers
447
+ , functora
447
448
, hspec
448
449
, unliftio
449
450
default-language : Haskell2010
Original file line number Diff line number Diff line change 1
1
let
2
- header = import ./header.nix ;
3
- proto-lens-src = fetchGit {
4
- url = "https://github.com/coingaming/proto-lens.git" ;
5
- ref = "master" ;
6
- rev = "7e75e2c95d9bf608965ff8335ee618978181034a" ;
7
- } ;
8
- proto-lens-protoc = header . pkgs . haskell-nix . project {
9
- src = "${ proto-lens-src } /proto-lens-protoc" ;
10
- compiler-nix-name = "ghc902" ;
2
+ src = fetchTarball {
3
+ url = "https://github.com/functora/functora.github.io/archive/53356131206ffdc2eae2f1a18f55333ef3465639.tar.gz" ;
4
+ sha256 = "1qsg53kakcjpk1qn2vwj90ypwynqw6zvj224664498a6mxl6j868" ;
11
5
} ;
6
+ prj = import "${ src } /nix/project.nix" { } ;
12
7
in
13
- proto-lens-protoc . hsPkgs . proto-lens-protoc . components . exes . proto-lens-protoc
8
+ prj . proto-lens-protoc . components . exes . proto-lens-protoc
Original file line number Diff line number Diff line change @@ -185,4 +185,5 @@ tests:
185
185
- unliftio
186
186
- containers
187
187
- hspec
188
+ - functora
188
189
<< : *ghcid
Original file line number Diff line number Diff line change 1
1
{
2
2
extraBuildInputs ? [ ] ,
3
- withShellHook ? false ,
3
+ withShellHook ? true ,
4
4
profile ? false ,
5
5
} : let
6
6
# project = import ./default.nix {inherit profile;};
9
9
# pkgs = header.pkgs;
10
10
# nixPkgsLegacy = header.nixPkgsLegacy;
11
11
# lnd = import ./nix/lnd.nix {inherit pkgs;};
12
- # proto-lens-protoc = import ./nix/proto-lens-protoc.nix;
12
+ proto-lens-protoc = import ./nix/proto-lens-protoc.nix ;
13
13
project = import ../../nix/project.nix { } ;
14
14
pkgs = project . pkgs ;
15
15
in
23
23
# haskellPackages.hpack
24
24
# haskellPackages.stack
25
25
# haskellPackages.hp2pretty
26
- # pkgs.bitcoin
27
- # pkgs.openssl
28
- # pkgs.expect
29
- # pkgs.ps
30
- # pkgs.jq
31
26
# pkgs.ormolu
32
27
# pkgs.niv
33
- # lnd
28
+ pkgs . bitcoin
29
+ pkgs . openssl
30
+ pkgs . expect
31
+ pkgs . ps
32
+ pkgs . jq
33
+ pkgs . lnd
34
34
pkgs . protobuf
35
- # proto-lens-protoc
36
- project . proto-lens-protoc . components . exes . proto-lens-protoc
35
+ proto-lens-protoc
37
36
]
38
37
++ extraBuildInputs ;
39
38
tools = {
Original file line number Diff line number Diff line change @@ -59,14 +59,25 @@ channelPointParser x =
59
59
Right txidHex -> do
60
60
idxTS <-
61
61
first
62
- ( const
63
- $ FromGrpcError " Invalid ChannelPoint outputIndex"
62
+ ( \ e ->
63
+ FromGrpcError
64
+ $ " Invalid ChannelPoint outputIndex BS "
65
+ <> inspect idxBS
66
+ <> " "
67
+ <> show e
64
68
)
65
69
$ decodeUtf8' idxBS
66
70
ChannelPoint (TxId $ BS. reverse txidHex)
67
- <$> maybeToRight
68
- (FromGrpcError " Invalid ChannelPoint outputIndex" )
69
- (readMaybe $ TS. unpack idxTS)
71
+ <$> maybe
72
+ ( Left
73
+ . FromGrpcError
74
+ $ " Invalid ChannelPoint outputIndex TS "
75
+ <> inspect idxTS
76
+ )
77
+ ( Right . Vout
78
+ )
79
+ ( readMaybe $ TS. unpack idxTS
80
+ )
70
81
Left {} ->
71
82
Left $ FromGrpcError " Invalid ChannelPoint fundingTxidBytes"
72
83
_ ->
You can’t perform that action at this time.
0 commit comments