-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add vasil features #157
Add vasil features #157
Conversation
Use it everywhere Refactor some things
I won't yet be merging master into this branch, as significant changes have occured, and I want this working first. |
…s' into bladyjoker/sam/add-vasil-features
…eatures Adding on top of Sam's Vasil PR
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.
Nothing regarding business logic! Just some styleguide/best practices stuff
Fix required checks in GH branch protection settings |
@t4ccer I will make those branch protection fixes when I merge, as to not confuse other PRs |
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.
Looks great! Disclaimer: I've not ran this code
Eff effs (Either (FileError ()) Text) | ||
writeMetadataFile pabConf metadata = | ||
let filepath = metadataFilePath pabConf metadata | ||
in fmap (const filepath) <$> writeFileRaw @w (Text.unpack filepath) metadata |
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.
in fmap (const filepath) <$> writeFileRaw @w (Text.unpack filepath) metadata | |
in (filepath <$) <$> writeFileRaw @w (Text.unpack filepath) metadata |
(shorter, but maybe less readable ¯_(ツ)_/¯)
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.
yeah I tend to lean towards fmap in situations like this.
theres also const filepath <<$>> ...
which would work, but its a bit of an unknown operator
@@ -257,6 +309,10 @@ unDummyPrivateKey :: DummyPrivKey -> Crypto.XPrv | |||
unDummyPrivateKey (FromSKey key) = key | |||
unDummyPrivateKey (FromVKey key) = key | |||
|
|||
-- | Used as a signing keys for foreign signers BPI has no access to (ie. multisig schemes) | |||
dummyXPrv :: Crypto.XPrv | |||
dummyXPrv = generate ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" :: Base.String) ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" :: Base.String) |
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.
dummyXPrv = generate ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" :: Base.String) ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" :: Base.String) | |
dummyXPrv = join generate("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" :: Base.String) |
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.
I wasn't aware join had this behaviour on functions, and im unsure how I feel about it
It feels misleading
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.
Yeah, I actually got join
from pointfree tool output myself =) I was just concerned a bit about typing exact amount of letters two times in arow - stopped to check if they are of the same length XD
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.
I think i'd rather leave as is, I might check if the passphrase input has to be the same length, as if we can change it to just "pass phrase"
, then this call makes more sense
Tremendous work 🎖️ |
Ran CI locally, all passes, merging :) |
a2045141fc0b4f14470ebf4679c6abe40aac4db7
runInEstimationEffect
function, which brings context we need into a state effect, and handles querying said state.make lint
to run hlint --refactor on each file usingapply-refact