Skip to content

Commit

Permalink
Merge pull request #83 from pshenmic/fix/testnet-35
Browse files Browse the repository at this point in the history
Fix indexer for dash-testnet-35
  • Loading branch information
pshenmic authored Nov 4, 2023
2 parents f05b1dd + f6875d5 commit e70ce6d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions packages/indexer/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/indexer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM rust:1.73-bookworm
RUN apt-get update && apt-get install -y cmake clang

WORKDIR /
RUN git clone https://github.com/dashevo/platform
RUN git clone --depth 1 --branch fix/rs-dpp-dashcore https://github.com/dashevo/platform

WORKDIR /app
COPY Cargo.lock /app
Expand Down
7 changes: 4 additions & 3 deletions packages/indexer/src/entities/transfer.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use dpp::identifier::Identifier;
use dpp::identity::state_transition::AssetLockProved;
use dpp::state_transition::identity_credit_transfer_transition::accessors::IdentityCreditTransferTransitionAccessorsV0;
use dpp::state_transition::identity_credit_transfer_transition::IdentityCreditTransferTransition;
use dpp::state_transition::identity_credit_withdrawal_transition::accessors::IdentityCreditWithdrawalTransitionAccessorsV0;
Expand All @@ -18,12 +19,12 @@ impl From<IdentityTopUpTransition> for Transfer {
fn from(state_transition: IdentityTopUpTransition) -> Self {
let identifier = state_transition.identity_id().clone();
let asset_lock = state_transition.asset_lock_proof().clone();
let vout_index = asset_lock.instant_lock_output_index().unwrap();
let vout_index = asset_lock.output_index();

let tx_out = asset_lock
.transaction()
.unwrap().clone()
.output.get(vout_index)
.cloned().unwrap();
.output.get(vout_index as usize).cloned().unwrap();
let amount = tx_out.value * 1000;

return Transfer {
Expand Down

0 comments on commit e70ce6d

Please sign in to comment.