Skip to content

Commit

Permalink
types: Remove FailedToTransactAsset field from XCM Error (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian authored Oct 19, 2022
1 parent e6e34e3 commit 91238f3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
2 changes: 0 additions & 2 deletions types/event_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,6 @@ func (e EventRecordsRaw) DecodeEventRecords(m *Metadata, t interface{}) error {
return fmt.Errorf("unable to find event with EventID %v in metadata for event #%v: %s", id, i, err)
}

// fmt.Printf("event #%v is in module %v with event name %v\n", i, moduleName, eventName)

log.Debug(fmt.Sprintf("event #%v is in module %v with event name %v", i, moduleName, eventName))

// check whether name for eventID exists in t
Expand Down
9 changes: 1 addition & 8 deletions types/xcm_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ type XCMError struct {
IsAssetNotFound bool

IsFailedToTransactAsset bool
FailedToTransactAsset string

IsNotWithdrawable bool

Expand Down Expand Up @@ -103,8 +102,6 @@ func (x *XCMError) Decode(decoder scale.Decoder) error { //nolint: funlen
x.IsAssetNotFound = true
case 9:
x.IsFailedToTransactAsset = true

return decoder.Decode(&x.FailedToTransactAsset)
case 10:
x.IsNotWithdrawable = true
case 11:
Expand Down Expand Up @@ -169,11 +166,7 @@ func (x XCMError) Encode(encoder scale.Encoder) error { //nolint:gocyclo,funlen
case x.IsAssetNotFound:
return encoder.PushByte(8)
case x.IsFailedToTransactAsset:
if err := encoder.PushByte(9); err != nil {
return err
}

return encoder.Encode(x.FailedToTransactAsset)
return encoder.PushByte(9)
case x.IsNotWithdrawable:
return encoder.PushByte(10)
case x.IsLocationCannotHold:
Expand Down
2 changes: 0 additions & 2 deletions types/xcm_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ var (
x.IsAssetNotFound = true
case 9:
x.IsFailedToTransactAsset = true

c.Fuzz(&x.FailedToTransactAsset)
case 10:
x.IsNotWithdrawable = true
case 11:
Expand Down

0 comments on commit 91238f3

Please sign in to comment.