-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3945 from hirosystems/release/fix-ledger-activity
Release/fix ledger activity
- Loading branch information
Showing
19 changed files
with
250 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import * as yup from 'yup'; | ||
|
||
import { WalletDefaultNetworkConfigurationIds } from '@shared/constants'; | ||
|
||
import { | ||
accountSchema, | ||
formatValidationErrors, | ||
getRpcParamErrors, | ||
validateRpcParams, | ||
} from './validation.utils'; | ||
|
||
const rpcSendTransferParamsSchema = yup.object().shape({ | ||
account: accountSchema, | ||
address: yup.string().required(), | ||
amount: yup.string().required(), | ||
network: yup.string().oneOf(Object.values(WalletDefaultNetworkConfigurationIds)), | ||
}); | ||
|
||
// TODO: Import param types from btckit when updated | ||
export function validateRpcSendTransferParams(obj: unknown) { | ||
return validateRpcParams(obj, rpcSendTransferParamsSchema); | ||
} | ||
|
||
export function getRpcSendTransferParamErrors(obj: unknown) { | ||
return formatValidationErrors(getRpcParamErrors(obj, rpcSendTransferParamsSchema)); | ||
} |
Oops, something went wrong.