Skip to content

Conversation

samholmes
Copy link
Contributor

@samholmes samholmes commented Aug 27, 2024

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

@samholmes samholmes force-pushed the sam/cardano-staking branch 2 times, most recently from 22019ee to 7172c9c Compare August 28, 2024 21:19
return clean.data
const raw = await fetchKiln(`/v1/eth/onchain/v2/stakes?wallets=${address}`)
const response = asKilnResponse(asStakesResponse)(raw)
if ('message' in response) throw new Error('Kiln error: ' + response.message)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is never true after the cleaner, did you mean to look in raw?

const filteredOps = clean.data.filter((op): op is ExitOperation => op != null)
const raw = await fetchKiln(`/v1/eth/onchain/v2/operations?wallets=${address}`)
const response = asKilnResponse(asOperations)(raw)
if ('message' in response) throw new Error('Kiln error: ' + response.message)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is never true after the cleaner, did you mean to look in raw?


export type AdaStakeTransaction = ReturnType<typeof asAdaStakeTransaction>
const asAdaStakeTransaction = asObject({
unsigned_tx_hash: asString,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsigned_tx_hash and a handful of keys in asAdaStake aren't used, can they be commented out?

adapterConfig: {
exitQueueAddress: '0x8979117a69DfA7F4D4E3c7B59197ff03f4A2CeAF',
type: 'ethereum-pooled-kiln',
accountId: ENV.KILN_TESTNET_ACCOUNT_ID,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this was added. It seems like implementation details for ADA staking are becoming unnecessary implementation details for ETH.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because it's a requirement for the shared KilnApi lib. Shall I make it optional, then I'd need to add assertions to each KilnApi method that requires it... I could do that if you think that's better. Or perhaps this lends to the question whether KilnApi should be broken up into two separate APIs. Or perhaps I can make the accountId a parameter for each method. Which seems best?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's only used in adaStakeTransaction just pass it in there

CNIOWindows: 3047f2d8165848a3936a0a755fee27c6b5ee479b
disklet: e7ed3e673ccad9d175a1675f9f3589ffbf69a5fd
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discard

FirebaseMessaging: 585984d0a1df120617eb10b44cad8968b859815e
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discard


// Do not allow Max button when staking
disableMaxStake?: boolean
mustMaxStake?: boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused

@samholmes samholmes force-pushed the sam/cardano-staking branch 2 times, most recently from 5dfb018 to 3ca06ab Compare September 3, 2024 01:15
@samholmes samholmes merged commit ff390fa into develop Sep 3, 2024
2 checks passed
@samholmes samholmes deleted the sam/cardano-staking branch September 3, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants