mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 04:35:49 +00:00
rename Bridge -> XChainBridge in models
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ValidationError } from '../../errors'
|
||||
import { Amount, Bridge } from '../common'
|
||||
import { Amount, XChainBridge } from '../common'
|
||||
|
||||
import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
|
||||
@@ -10,7 +10,7 @@ import { BaseTransaction, validateBaseTransaction } from './common'
|
||||
export interface XChainCreateBridge extends BaseTransaction {
|
||||
TransactionType: 'XChainCreateBridge'
|
||||
|
||||
Bridge: Bridge
|
||||
XChainBridge: XChainBridge
|
||||
|
||||
SignatureReward: Amount
|
||||
|
||||
@@ -26,8 +26,8 @@ export interface XChainCreateBridge extends BaseTransaction {
|
||||
export function validateXChainCreateBridge(tx: Record<string, unknown>): void {
|
||||
validateBaseTransaction(tx)
|
||||
|
||||
if (tx.Bridge == null) {
|
||||
throw new ValidationError('XChainCreateBridge: missing field Bridge')
|
||||
if (tx.XChainBridge == null) {
|
||||
throw new ValidationError('XChainCreateBridge: missing field XChainBridge')
|
||||
}
|
||||
|
||||
if (tx.SignatureReward == null) {
|
||||
|
||||
Reference in New Issue
Block a user