-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update to cardano-graphql 2.2.0-beta use new combined schema in package, removing local build step * feat: show deposits and reclaims when present in transaction Shows Deposit or Deposit Reclaim in the TransactionInfo when present in transaction Closes #353 * feat: add withdrawals to TransactionInfo Withdrawals from reward accounts are displayed alongside transaction inputs in the 'from' section. Closes #352 * feat: resolve stake address searches based on withdrawals searchForAddress is now separated into searchForPaymentAddress and searchForStakeAddress, determined by using the bech32 prefix. Closes #352 * feat: use stake pool hash over slot leader reference when a block is created by a stake pool, the pool hash is now used. BFT nodes still use the slot leader reference Closes #355 * chore: bump versions, update changelog
- Loading branch information
Showing
31 changed files
with
394 additions
and
138 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 |
---|---|---|
|
@@ -6,4 +6,3 @@ yarn-error.log | |
.env | ||
generated/ | ||
result* | ||
schema.graphql |
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
Binary file not shown.
Binary file not shown.
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,15 +1,36 @@ | ||
import { Currency } from 'cardano-js'; | ||
import { SearchForAddressQuery } from '../../../../generated/typings/graphql-schema'; | ||
import { IAddressSummary } from '../types'; | ||
import { | ||
SearchForPaymentAddressQuery, | ||
SearchForStakeAddressQuery, | ||
} from '../../../../generated/typings/graphql-schema'; | ||
import { IPaymentAddressSummary, IStakeAddressSummary } from '../types'; | ||
|
||
export const addressDetailTransformer = ( | ||
export const paymentAddressDetailTransformer = ( | ||
address: string, | ||
s: SearchForAddressQuery | ||
): IAddressSummary => ({ | ||
address, | ||
finalBalance: Currency.Util.lovelacesToAda( | ||
s.utxos_aggregate?.aggregate?.sum?.value || '0' | ||
), | ||
transactionsCount: | ||
s.transactions_aggregate?.aggregate?.count.toString() || '0', | ||
}); | ||
s: SearchForPaymentAddressQuery | ||
): IPaymentAddressSummary => { | ||
return { | ||
address, | ||
finalBalance: Currency.Util.lovelacesToAda( | ||
s.utxos_aggregate?.aggregate?.sum?.value || '0' | ||
), | ||
transactionsCount: | ||
s.transactions_aggregate?.aggregate?.count.toString() || '0' | ||
} | ||
}; | ||
|
||
export const stakeAddressDetailTransformer = ( | ||
address: string, | ||
s: SearchForStakeAddressQuery | ||
): IStakeAddressSummary => { | ||
return { | ||
address, | ||
totalWithdrawals: | ||
s.withdrawals_aggregate?.aggregate?.count.toString() || '0', | ||
totalWithdrawn: Currency.Util.lovelacesToAda( | ||
s.withdrawals_aggregate?.aggregate?.sum?.amount || '0' | ||
), | ||
transactionsCount: | ||
s.transactions_aggregate?.aggregate?.count.toString() || '0' | ||
} | ||
}; |
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,5 +1,13 @@ | ||
export interface IAddressSummary { | ||
address: string; | ||
finalBalance: string; | ||
transactionsCount: string; | ||
} | ||
|
||
export interface IPaymentAddressSummary extends IAddressSummary { | ||
finalBalance: string; | ||
} | ||
|
||
export interface IStakeAddressSummary extends IAddressSummary { | ||
totalWithdrawals: string; | ||
totalWithdrawn: string; | ||
} |
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
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
2 changes: 1 addition & 1 deletion
2
...tures/search/api/searchForAddress.graphql → ...earch/api/searchForPaymentAddress.graphql
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,4 +1,4 @@ | ||
query searchForAddress( | ||
query searchForPaymentAddress( | ||
$address: String! | ||
) { | ||
utxos_aggregate ( | ||
|
Oops, something went wrong.