Skip to content

Commit

Permalink
Move header var
Browse files Browse the repository at this point in the history
  • Loading branch information
chowbao committed Nov 2, 2023
1 parent f51cdb3 commit fe1dd24
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/export_claimable_balances.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ var claimableBalancesCmd = &cobra.Command{
outFile := mustOutFile(path)
numFailures := 0
totalNumBytes := 0
var header xdr.LedgerHeaderHistoryEntry
for _, balance := range balances {
var header xdr.LedgerHeaderHistoryEntry
transformed, err := transform.TransformClaimableBalance(balance, header)
if err != nil {
cmdLogger.LogError(fmt.Errorf("could not transform balance %+v: %v", balance, err))
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_config_setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ var configSettingCmd = &cobra.Command{
outFile := mustOutFile(path)
numFailures := 0
totalNumBytes := 0
var header xdr.LedgerHeaderHistoryEntry
for _, setting := range settings {
var header xdr.LedgerHeaderHistoryEntry
transformed, err := transform.TransformConfigSetting(setting, header)
if err != nil {
cmdLogger.LogError(fmt.Errorf("could not transform config setting %+v: %v", setting, err))
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_contract_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ var codeCmd = &cobra.Command{
outFile := mustOutFile(path)
numFailures := 0
totalNumBytes := 0
var header xdr.LedgerHeaderHistoryEntry
for _, code := range codes {
var header xdr.LedgerHeaderHistoryEntry
transformed, err := transform.TransformContractCode(code, header)
if err != nil {
cmdLogger.LogError(fmt.Errorf("could not transform contract code %+v: %v", code, err))
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_contract_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ var dataCmd = &cobra.Command{
outFile := mustOutFile(path)
numFailures := 0
totalNumBytes := 0
var header xdr.LedgerHeaderHistoryEntry
for _, data := range datas {
var header xdr.LedgerHeaderHistoryEntry
TransformContractData := transform.NewTransformContractDataStruct(transform.AssetFromContractData, transform.ContractBalanceFromContractData)
transformed, err, ok := TransformContractData.TransformContractData(data, env.NetworkPassphrase, header)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_expiration.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ var expirationCmd = &cobra.Command{
outFile := mustOutFile(path)
numFailures := 0
totalNumBytes := 0
var header xdr.LedgerHeaderHistoryEntry
for _, expiration := range expirations {
var header xdr.LedgerHeaderHistoryEntry
transformed, err := transform.TransformExpiration(expiration, header)
if err != nil {
cmdLogger.LogError(fmt.Errorf("could not transform expiration %+v: %v", expiration, err))
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_liquidity_pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ the export_ledger_entry_changes command.`,
outFile := mustOutFile(path)
numFailures := 0
totalNumBytes := 0
var header xdr.LedgerHeaderHistoryEntry
for _, pool := range pools {
var header xdr.LedgerHeaderHistoryEntry
transformed, err := transform.TransformPool(pool, header)
if err != nil {
cmdLogger.LogError(fmt.Errorf("could not transform pool %+v: %v", pool, err))
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_offers.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ var offersCmd = &cobra.Command{
outFile := mustOutFile(path)
numFailures := 0
totalNumBytes := 0
var header xdr.LedgerHeaderHistoryEntry
for _, offer := range offers {
var header xdr.LedgerHeaderHistoryEntry
transformed, err := transform.TransformOffer(offer, header)
if err != nil {
cmdLogger.LogError(fmt.Errorf("could not transform offer %+v: %v", offer, err))
Expand Down
2 changes: 1 addition & 1 deletion cmd/export_trustlines.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ var trustlinesCmd = &cobra.Command{
outFile := mustOutFile(path)
numFailures := 0
totalNumBytes := 0
var header xdr.LedgerHeaderHistoryEntry
for _, trust := range trustlines {
var header xdr.LedgerHeaderHistoryEntry
transformed, err := transform.TransformTrustline(trust, header)
if err != nil {
cmdLogger.LogError(fmt.Errorf("could not json transform trustline %+v: %v", trust, err))
Expand Down

0 comments on commit fe1dd24

Please sign in to comment.