Skip to content

Commit

Permalink
Update after HexString change in SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
schwartz-concordium committed Jul 26, 2023
1 parent 3151f37 commit d247d9b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ internal static ProtocolChainUpdatePayload From(ProtocolUpdate update)
return new ProtocolChainUpdatePayload(
update.Message,
update.SpecificationUrl,
update.SpecificationHash.ToHex(),
update.SpecificationHash.ToHexString(),
Convert.ToHexString(update.SpecificationAuxiliaryData).ToLowerInvariant()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal static TransactionRejectReason MapRejectReason(IRejectReason rejectReas
Concordium.Sdk.Types.OutOfEnergy => new OutOfEnergy(),
Concordium.Sdk.Types.RejectedInit x => new RejectedInit(x.RejectReason),
Concordium.Sdk.Types.RejectedReceive x => new RejectedReceive(x.RejectReason,
ContractAddress.From(x.ContractAddress), x.ReceiveName.Receive, x.Parameter.ToHex()),
ContractAddress.From(x.ContractAddress), x.ReceiveName.Receive, x.Parameter.ToHexString()),
Concordium.Sdk.Types.InvalidProof => new InvalidProof(),
Concordium.Sdk.Types.AlreadyABaker x => new AlreadyABaker(x.BakerId.Id.Index),
Concordium.Sdk.Types.NotABaker x => new NotABaker(AccountAddress.From(x.AccountAddress)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ internal static ContractInitialized From(Concordium.Sdk.Types.ContractInitialize
ContractAddress.From(contract.Data.ContractAddress),
contract.Data.Amount.Value,
contract.Data.InitName.Name,
contract.Data.Events.Select(d => d.ToHex()).ToArray()
contract.Data.Events.Select(d => d.ToHexString()).ToArray()
);
}
}
Expand Down Expand Up @@ -536,9 +536,9 @@ internal static ContractUpdated From(Updated updated)
ContractAddress.From(updated.Address),
Address.From(updated.Instigator),
updated.Amount.Value,
updated.Message.ToHex(),
updated.Message.ToHexString(),
updated.ReceiveName.Receive,
updated.Events.Select(e => e.ToHex()).ToArray()
updated.Events.Select(e => e.ToHexString()).ToArray()
);
}
}
Expand All @@ -548,7 +548,7 @@ public record CredentialDeployed(
AccountAddress AccountAddress) : TransactionResultEvent
{
internal static CredentialDeployed From(AccountCreationDetails accountCreationDetails) =>
new(accountCreationDetails.RegId.ToHex(),
new(accountCreationDetails.RegId.ToHexString(),
AccountAddress.From(accountCreationDetails.Address));
}

Expand All @@ -562,7 +562,7 @@ public record CredentialKeysUpdated(
internal static CredentialKeysUpdated From(Concordium.Sdk.Types.CredentialKeysUpdated keys)
{
return new CredentialKeysUpdated(
keys.CredId.ToHex()
keys.CredId.ToHexString()
);
}
}
Expand All @@ -586,8 +586,8 @@ internal static CredentialsUpdated From(
{
return new CredentialsUpdated(
AccountAddress.From(sender),
updated.NewCredIds.Select(c => c.ToHex()).ToArray(),
updated.RemovedCredIds.Select(c => c.ToHex()).ToArray(),
updated.NewCredIds.Select(c => c.ToHexString()).ToArray(),
updated.RemovedCredIds.Select(c => c.ToHexString()).ToArray(),
(byte)updated.NewThreshold.Threshold
);
}
Expand All @@ -604,7 +604,7 @@ public DecodedText GetDecoded()
return DecodedText.CreateFromHex(DataAsHex);
}

internal static DataRegistered From(Concordium.Sdk.Types.DataRegistered registered) => new(registered.ToHex());
internal static DataRegistered From(Concordium.Sdk.Types.DataRegistered registered) => new(registered.ToHexString());
}

/// <summary>
Expand Down Expand Up @@ -740,7 +740,7 @@ internal static ContractInterrupted From(Interrupted interrupted)
{
return new ContractInterrupted(
ContractAddress.From(interrupted.Address),
interrupted.Events.Select(e => e.ToHex()).ToArray()
interrupted.Events.Select(e => e.ToHexString()).ToArray()
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions backend/Tests/Api/GraphQL/Import/BakerWriterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ public async Task UpdateBakersFromAccountBaker()
{
new AccountBaker
(
BakerId: new BakerId(new AccountIndex(11)),
BakerInfo: new BakerInfo(BakerId: new BakerId(new AccountIndex(11)), Array.Empty<byte>(),Array.Empty<byte>(), Array.Empty<byte>()),
PendingChange: new AccountBakerRemovePending(_anyDateTimeOffset),
RestakeEarnings: false,
StakedAmount: CcdAmount.Zero,
null
BakerPoolInfo: null
)
};

Expand Down

0 comments on commit d247d9b

Please sign in to comment.